Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By spade on
Hi,
I managed to configure CKEditor to accept the img tag and can insert an image and specity a certain width. When I store it, the node is displayed with this setting, but when I edit the node again, that setting is lost.
I'm using CKEdior 4.5.6 standard.
What is going wrong here? What can I do to make it work right?
Greetings,
Frank
Comments
Sounds like your text format
Sounds like your text format is stripping out the attributes. Which format are you using? You might want to check how the HTML filter, if any, is set up for that format.
I've had good luck using IMCE for image management in CKEditor, by the way.
============================
Resonetrics: Better Tools for Building Brands
http://resonetrics.com
http://technologyformarketers.com
http://kittenassociates.org
http://www.linkedin.com/in/sammooreatresonetrics
If it were, the whole img tag
If it were, the whole img tag would be gone, like it was before I added it to the allowed HTML-tag list.
And thanks, yes, I'm using IMCE too, but don't see how that helps here.
Sorry, the IMCE reference was
Sorry, the IMCE reference was just an aside.
You'll likely have to visit the Allowed Content filter section in your CKEditor setup.
As of CKE 4.1.?? the control of what's allowed has gotten more fine-grained. It's not just HTML elements - attributes, styles and classes can be filtered.
More info here:
http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules
============================
Resonetrics: Better Tools for Building Brands
http://resonetrics.com
http://technologyformarketers.com
http://kittenassociates.org
http://www.linkedin.com/in/sammooreatresonetrics
Thank you for your patience
Thank you for your patience and guidance.
I now added "img[alt,!src,style]{width,height};" in the "Extra allowed content" field, but it didn't change a thing.
When I check the source it contains the style attribute and works as it should, but when I load the node into CKEditor again, it is all gone.
Well that's peculiar. I'd
Well that's peculiar. I'd post a note on the CKEditor site if I were you.
I'd be interested to hear what the issue is, and I imagine others would be also.
============================
Resonetrics: Better Tools for Building Brands
http://resonetrics.com
http://technologyformarketers.com
http://kittenassociates.org
http://www.linkedin.com/in/sammooreatresonetrics
Well, I will try to recreate
Well, I will try to recreate this in Drupal 7 and/or 8 first, since who still cares for Drupal 6? Sorry to say ...
Sorry I missed the D6 tag -
Sorry I missed the D6 tag - you may have a jQuery version issue or something like that. In any case trying D7 would be a good idea.
============================
Resonetrics: Better Tools for Building Brands
http://resonetrics.com
http://technologyformarketers.com
http://kittenassociates.org
http://www.linkedin.com/in/sammooreatresonetrics