I have a problem with the default behaviour of fckeditor, and also when the 'fullpage' option is set to true.
I have two types of source data - files with html head and body tags, and files without those. When fullpage is set to false, the html head and body tags all get stripped from files. When fullpage is set to true, the problem is that files without html, head, body tags have them inserted.
Ideally I just want fckeditor to not insert or remove any html, body or head tags.
Is it possible to configure it in this way ?
I have two types of source data - files with html head and body tags, and files without those. When fullpage is set to false, the html head and body tags all get stripped from files. When fullpage is set to true, the problem is that files without html, head, body tags have them inserted.
Ideally I just want fckeditor to not insert or remove any html, body or head tags.
Is it possible to configure it in this way ?
RE: Stop Fckeditor stripping html, body tags
i want FCKEditor only to show and to edit the posted code, not to clean up or auto-complete it.
how to disable the parser?
Re: Stop Fckeditor stripping html, body tags
Re: Stop Fckeditor stripping html, body tags
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. some styles in head section) to existing HTML document then 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/s ... ument.html
http://docs.cksource.com/ckeditor_api/s ... ement.html
http://docs.cksource.com/ckeditor_api/s ... .node.html
Re: Stop Fckeditor stripping html, body tags
as far as I can see, Ckeditor does not handle fullpage mode properly. For example, if you switch an editor from fullpage to "classic", it will leave certain tags like <title></title>. Also, when you switch it from classic to fullpage, it will sometime incorrectly insert the html/head/body tags.
Overtime, I have noticed a tremendous amount of problems when my users enter incorrect or incorrectly formated HTML code: Ckeditor will simply try to "correct" the code and alegedly stip important portions of the existing code, while inserting dummy empty body/head tags. The result is 100x worse than having the original incorrectly formated html entered by the user.
This is why I too am looking to deactivate completely the automatic code rewriting/inserting from Ckeditor.
@j.swiderski: I am unsure how the onpaste method you suggest would address this issue
Re: Stop Fckeditor stripping html, body tags