Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#484 closed Bug (invalid)

SetHTML changes lost in IE

Reported by: Martin Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Pending WorksForMe Cc:

Description

I am calling SetHTML to dynamically change the contents of the editor and it appears to work fine.

However I find that in IE6 that the changes can be lost on pressing submit or viewing source.

Stepping through the code it appears that the problem is that "this.EditorDocument.body.innerHTML" still contains the old HTML that predates the SetHTML function call.

Change History (7)

comment:1 Changed 13 years ago by Frederico Caldeira Knabben

Keywords: Pending WorksForMe added

Sorry, but this one sounds really strange. Can you provide us a test case page so we can see it here?

comment:2 Changed 13 years ago by Martin

I've narrowed it down to the FCKXHtml.GetXHTML call.

Before it EditorDocument.body.innerHTML has the correct value.

After it's evaluated it has the old value.

I'll post back once I've narrowed it down a bit further...

comment:3 Changed 13 years ago by Martin

I discovered in the end that the issue was that the call to GetXHTML was changing the HTML.

Unluckily enough it did it in such a way that it resembled the first HTML so I jumped to the wrong conclusion, apologies!

I am finding in general in IE even very simple HTML seems to get mangled by the GetXHTML call.

Is this conversion to XHTML an option that can be turned on or off?

comment:4 Changed 13 years ago by Frederico Caldeira Knabben

Resolution: invalid
Status: newclosed

FCKeditor is not really making a conversion to XHTML. It actually loads the DOM tree and transforms it to text. The problem is that IE's DOM is quite buggy, so we may face problems on very specific cases.

I would recommend you to open tickets with sample HTML that gets mangled, so we can work on them, trying to find out solutions.

comment:5 Changed 13 years ago by Martin

OK thanks.

I was wondering why this.EditorDocument.body.innerHTML wasn't just used directly and why the GetXHTML call is required?

comment:6 Changed 13 years ago by Frederico Caldeira Knabben

The first important thing: just call innerHTML in IE, Firefox and Opera to see how different it is for each browser.

Other than that, FCKeditor inserts some custom elements and attributes that must be manipulated on output, other than configurations processing, like the entities handling for example. There are also more things that must be done while processing, but I think you already got the idea.

comment:7 Changed 13 years ago by Martin

Thanks for getting back to me on this.

I'll try and start documenting specific cases where things go awry in IE in order to open tickets as per your suggestion above.

Cheers,

Martin

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy