I have been working with the fantastic widgets plugin released for CKEditor. They work perfectly, except for one vital issue. You cannot place images in widgets.
I've looked into various references, allowedContent, filters, Allowed Filter Content, etc. But nothing seems to work. Is there an easy way to allow people to place images WITHIN editable regions of a widget?
Take this page : http://ckeditor.com/demo#widgets - when you click in one of the editable regions of the widget, some of the toolbar items are disabled. On my editor, the images button is disabled, meaning people can't plane images within these widget sections.
Any help will be appriciated.
Also, just to add, my widget
Also, just to add, my widget editables definition looks like this:
Content: {
selector: '.leftAlignText',
allowedContent: 'img[!src,alt]'
}
However, even if I use the source view to add an image manually, when I revert to the wysiwyg view, the image will be removed, regardless of the value of allowedContent.
The image can be inserted in
The image can be inserted in widget's nested editable. I've just checked image plugin with a simplebox modified that it contained `allowedContent: 'img[!src,alt]` and everything worked fine - the button was active and I was able to insert image in the simplebox content.
However, what's not going to work is image2 (the Enhanced Image) in widget's nested editable. That's most likely what you tried to do. The reason why it doesn't work is that it's not possible yet to nest widgets. One widget cannot contain another one in its nested editable. You can read more about this limitation here: http://dev.ckeditor.com/ticket/10931.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Hmm, okay. I will try this
Sweet, I've just tried again,
Sweet, I've just tried again, after adding the line below into my ckeditor config, it worked. I would be nice to use the newer image plugin, mainly for the resizing ability.
I have started looking into maybe running both at the same time, and simply showing and hiding the toolbar items when inside a widget, so that the image2 plugin can be used in other areas of the editor. What's my chance of success on that, realistically?
Thanks for your help!