Opened 13 years ago

Closed 13 years ago

#7998 closed Bug (invalid)

Editor keeps adding OR stripping HTML tags

Reported by: ancebal Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.6.4
Keywords: Cc:

Description

I need to include a *portion* of HTML in my page (ie: a header with some css, a piece of content within the body tag, etc). Before I added the FCKConfig.FullPage = true setting the editor used to strip everything above the body tag but now that I have added FCKConfig.FullPage = true I can't just add a chunk of code without the editor adding the rest. These users are also reporting the same problem, http://cksource.com/forums/viewtopic.php?f=6&t=530

Is there a solution to this bug?

Thank you, Jose Gosende jose.gosende@…

Change History (1)

comment:1 Changed 13 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

First of all this is not a bug but how FCKeditor and CKEditor works (the former is no longer supported).

If you want to add some HTML (e.g. header with some CSS) to existing HTML document you should set config.fullPage=true, and create an “onpaste” method or a plug-in that will walk through DOM Tree created by CKEditor, recognize tags like HEAD, BODY etc. and append appropriate pieces of your HTML to those tags.

There are many CKEditor classes and methods that allow to do that easily. Just to mention: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.document.html http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.element.html http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.node.html

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy