I've come across a strange but very important issue. If I have an image in my Body field (which uses the CKEditor, obviously) and add an inline style (i.e. style="padding-right: 0.25em;"
) to that img tag, I can no longer edit the field once it's submitted!
Say I do this to a Page and hit Save, then click the Edit tab on that page again. The CKEditor still appears and I can make changes to the Body field, but these are discarded when I click Save again. Along those lines, if I click the "Source" button on the toolbar under these same circumstances, it simply disables (greys out) and does not enter "Source mode".
If I add inline styles to other elements (such as a ul tag), this does not happen. It appears that it only occurs with images.
Comment | File | Size | Author |
---|---|---|---|
#2 | wysiwyg_ckeditor-1906552-2.patch | 777 bytes | markabur |
Comments
Comment #1
markabur CreditAttribution: markabur commentedI'm seeing this too: the source button stops working and the field changes don't get saved.
I am also seeing that
style=" "
gets added to the img tag when I add a caption using this module's image button and Caption field. That triggers the bug, so the net effect is that if I use the caption feature, I can't save any changes after that. Deleting the image and saving the changes restores the normal behavior.Comment #2
markabur CreditAttribution: markabur commentedAttached patch might not be the best approach but it works for me -- it removes the style attribute completely whenever you use the drupalimage plugin, e.g. to add/edit a caption.
For me this fixes the issue, and I don't want the style attribute anyway, but there is probably a better solution that isn't destructive.
Comment #3
quicksketchHi guys, I ran into a similar error that initially was triggered by the height and width attributes missing. This was fixed in http://drupalcode.org/project/wysiwyg_ckeditor.git/commitdiff/ffe03723b7...
After applying that fix, I couldn't reproduce this problem. I think the two were related and this problem has been fixed as a side-effect of that one. I'm going to be making a stable release shortly. If the new version still exhibits this problem, please reopen.