Active
Project:
CKEditor 4 - WYSIWYG HTML editor
Version:
7.x-1.3
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2013 at 20:49 UTC
Updated:
1 May 2017 at 01:48 UTC
Jump to comment: Most recent
Comments
Comment #1
sudoflyI spent some time troubleshooting this specific scenario:
- My CKeditor profile for Filtered Html has the link button disabled
- When adding content I "switch to plain text editor"
- I add html containing an a tag link
- I save the node. Link displays correctly when viewing the node.
- I go to edit the node.. I see that the a tag has disappeared from the content. The link text remains inside p tags
- CKEditor JS library version: 4.1.1
I stepped through the PHP code in this module that is responsible for the output to the wysiwyg textarea, namely the ckeditor_pre_render_text_format() and ckeditor_profile_load() functions. I also stepped through the JS code provided by this module, in ckeditor.utils.js, which is executed when CKEditor loads on a page.
It looks like the code in this module is correctly providing the data for the wysiwyg textarea.. the data returned by both the PHP and JS functions contained the link in the proper format with the a tag present. The a tag was stripped after additional functions from the CKEditor JS library (/libraries/ckeditor/ckeditor.js) were executed.
This issue did indeed go away once I added the "link" button to my CKEditor toolbar
Comment #2
dflitner commentedIf you're using the 4.1+ CKEditor then this behavior is caused by the Advanced Content Filter as explained in the CKEditor project page. Disable the filter and it will stop stripping stuff for which you don't have a button in your toolbar.
Comment #3
sheise commentedGreat, that works. Thank you.
Comment #4
xurizaemonTo disable the ACF (please read ACF docs on why it exists before doing so),
admin/config/content/ckeditor→ (your full HTML format) → edit → advanced options → custom javascript configuration →config.allowedContent = true;(this suggestion is given on the project page @ https://drupal.org/project/ckeditor also)
Comment #5
Jemian commentedThank you for your help. I had this problem as well. You solved it.