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

Sam Moore’s picture

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.

spade’s picture

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.

Sam Moore’s picture

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

spade’s picture

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.

Sam Moore’s picture

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.

spade’s picture

Well, I will try to recreate this in Drupal 7 and/or 8 first, since who still cares for Drupal 6? Sorry to say ...

Sam Moore’s picture

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.