I'm trying to add images with the 'add media' widget, but after selecting the image and click 'submit' it is not being added.
I've found out that the problem is on the library.js file, insertMediaFile function:
`ckeditorInstance.insertHtml(toInsert);` is adding empty string for some reason, when I'm changing the toInsert string from the img tag to `
test
` it works just fine.
Example of the original toInsert string:
<img typeof="foaf:Image" src="/sites/default/files/wysiwyg_uploads/test.jpg" alt="" class="media-image attr__typeof__foaf:Image img__fid__3047 img__view_mode__default attr__format__default attr__field_file_image_alt_text[und][0][value]__test ALT attr__field_file_image_title_text[und][0][value]__">
For now I've just added the 'unfiltered_html' mode, like that:
`ckeditorInstance.insertHtml(toInsert, 'unfiltered_html');`
Related modules and core versions:
Media: 7.x-2.0-alpha4
Drupal: 7.27
Is it a bug? configuration issue?
Comments
Comment #1
rreiss commentedComment #2
rreiss commentedThe problem was that I had to add the `config.extraAllowedContent = 'img[!src,alt,title,width,height,style](*){*}';` configuration (admin/config/content/ckeditor)