Ticket #7998 (closed Bug: invalid)

Opened 3 years ago

Last modified 3 years ago

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

comment:1 Changed 3 years ago by j.swiderski

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

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy