Ticket #4664 (closed Bug: duplicate)

Opened 5 years ago

Last modified 5 years ago

config.baseHref not used in WYSIWYG area

Reported by: ElbertF Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0.1
Keywords: Cc:

Description

It took me a while to figure out why images were broken when editing a page even though config.baseHref was set to the correct path (I'm using one editor to edit pages in different directories and change the baseHref value dynamically).

I fixed it by changing /plugins/wysiwygarea/plugin.js (around line 559), from:

data =

editor.config.docType +

'<html dir="' + editor.config.contentsLangDirection + '">' +

'<head>' +

To:

data =

editor.config.docType +

'<html dir="' + editor.config.contentsLangDirection + '">' +

'<base href="'+ editor.config.baseHref + '"/>' +

'<head>' +

Please let me know if there is a better way of doing this but this fixed the issue for me.

Change History

comment:1 Changed 5 years ago by garry.yao

  • Status changed from new to closed
  • Resolution set to duplicate

DUP of #3401.

comment:2 Changed 5 years ago by fredck

  • Milestone CKEditor 3.x deleted
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy