1. When new content is added using CK editor, the proper HTML code is included and the new content is displayed properly in the page view. However, if I choose to edit the content, the text is loaded back into CKeditor without the HTML and all HTML is now missing.
CKEditor version is 3.6.1
2. the toolbar format configured in Drupal is missing some elements shown on the CKEditor website. The code shown on their site cannot be cut and pasted into the configuration dialog in Drupal. Are some features excluded?
Comments
Comment #1
mkesicki commentedMaybe you use wrong input format and this is the reason why your html is stripped.
You can configure toolbar in CKEDitor's profile configuration. You can add or remove buttons for toolbar there.
What did you mean about that ? What do you want copy and where paste ?
Can you give us example about you missing/stripped html ? It will be easier to check and fix.
Comment #2
Ashlar commentedThe input format is set to Filtered HTML. When I view the html code by selecting "Source" in CKEditor, it shows the correct HTML code. After I save the content and display the page in the browser, it remains formatted. When I edit the content and return to CKEditor, all of the HTML code is now stripped out and shows in CKEditor as one long string of text.
The Menu code I was truing to enter can be found at:
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar#Toolbar_C...
It is a different format than the code that was included in the CKeditor download. Are their instructions including a list of toolbar menu options somewhere? I have not found them yet.
Comment #3
mkesicki commentedCan you paste us a sample of html code with you have a problem ? Paste what you have in CKEditor source before save and what you have when you try edit after save.
About buttons in toolbars, yes they change in latest version of CKEditor library (look at link you paste) and in CKEditor module for drupal we support old format.
In old format there was no label so now this looks like
and earlier it was:
Please look at "Toolbar" option in "Editor appearance" tab in CKEditor's profile configuration.
Comment #4
Ashlar commentedPlease read this in a plain text editor to see HTML code placements.
This is text entry in source view before saving content to the website:
This is a H1 format paragraphThis is a H2 format paragraph
This is normal text
It appears on the site with this (code from Firebug):
This is a H1 format paragraph
This is a H2 format paragraph
This is normal text
(note that the headings have been removed)
When I choose to edit the content and return to CKEditor the source is now:
This is a H1 format paragraph This is a H2 format paragraph This is normal text
(All HTML code has been stripped.)
I am using Drupal 7, the latest version.
Comment #5
dczepierga commentedTry to change text format to Full HTML and then check.
By default Filtered HTML strip a lot of tags.
Greetings
Comment #6
Ashlar commentedSwitching to Full HTML corrected the problem! I think this may be a bug in Drupal 7, since filtered html includes basic formatting such as headings. Thanks for working this out with me.
Comment #7
Ashlar commentedI submitted a bug report for Drupal core.
Comment #8
dczepierga commentedOk, so i think i can close this isssue.
Greetings
Comment #9
Ashlar commentedI switched from the CKEditor module to the WSIWYG module using the CK editor and the problem of dropping code in filtered HTML mode did not occur. I suspect there is something in your module hat is causing the problem.
The behavior I am seeing is that when I originally enter new content including multiple paragraphs with H1, h2 etc., the headings are dropped when the content is saved, although the paragraphs are preserved. When the content is reload to edit further, it shows up without the separate paragraphs. Only the outer
wrapper remains.
Good luck. Let me know if I can help you at all.
Comment #10
mkesicki commentedThx for your help , we will try check and fix this ASAP.
Comment #11
bperet commentedI am running in to similar problems using custom filters (mathfilter in this case), where the filter is being executed PRIOR to the text being sent to the editor, and the filtered results appear on the edit screen rather than the original text.
In the case of mathfilter, [tex] is transformed into an <img> element to display an equation. Prior to 1.3, the [tex] commands would just show up in the editor as they should, but in 7.x-1.3 it now has the <img> tags (the filtered result) instead. If you save the edit, then your original text is destroyed.
The html problem may be the same--the html is being filtered prior to being sent to the editor, stripping the html elements. The behavior of mathfilter is identical--works OK first time you create the page (not filtered since nothing exists), but when you go to edit, the filter is called and the source is altered prior to editing.
I can verify that it IS a ckeditor problem, not Drupal core, as I restored back to 1.2 and it works fine. Upgrading to ckeditor 1.3 initiates this behavior.
Comment #12
Hubert_r commentedI confirm it is happening with 7.x-1.3. I am using the insert_view filter, and the view content is inserted into the editor when I edit the page (i.e the filter is being called when we edit the page). Reverting back to 7.x-1.2 solves it.
Comment #13
mkesicki commentedOk, guys we try check and fix this ASAP. Thx for report this.
Comment #14
arcane commentedsubscribe
Comment #15
dczepierga commentedHi,
We add new feature to CKEditor module: #1280298: [D7] Add configuration option to disable text format filters in filter/xss request.
It should help in this case. Pls update to last DEV version and check does it help or not.
Greetings
Comment #16
bperet commentedUsing the DEV version and disabling the text format filters fixes the problems with mathfilter--the original text returns, just like it used to.
I would recommend making "disabled" the default, to keep behavior consistent with previous versions and to prevent people from unknowingly destroying their page content. Also, please update the README or TROUBLESHOOTING document to include some info on this situation, as what is happening is not obvious.
Comment #17
jdelaune commentedI agree with bperet disabled should probably be the default as it messed me up :P