My clients need to be able to insert pictures with margins and float attributes in text fields. Since this is not possible with Drupals default "Filtered HTML" filter I thought I could solve it easily with WYSIWYG Filter. Now I have spent two hours trying to make it work, but still it doesn't. When showing text content, all images has been filtered out from the HTML.

I have tried different options for configuring the img tag in "HTML Elements and attributes", but nothing seems to work.

Comments

BMorse’s picture

What WYSIWYG editor are you working with? I haven't tried that version of WYSIWYG Filter but on the D6 version I had a similar problem with TinyMCE. I just wouldn't insert images at all. When I switched to CKeditor it worked fine.

Eric_A’s picture

I experienced the same with TinyMCE 3.4.8. A workaround is to allow id "__mce_tmp".
The TinyMCE 3.4.5 Changelog says "Fixed bug with image dialogs not inserting an image if id was omitted from valid_elements." I did not test though if there is a regression here or if it just never works with WYSIWYG Filter 7.x-1.6-rc2. If the latter is true then this issue becomes a bug rather than a support request.

pminf’s picture

Same issue here with CKEditor 3.6.2 and Drupal module CKEditor 7.x-1.6.
Btw: I don't think it's possibel to fill "__mce_tmp" into "Rules for Element IDs", because element IDs should start with an upper or lower case letter "a to z".

pminf’s picture

Problem solved for me. I was missing img[width|height|alt|title|src] in my whitelist.

luthien’s picture

#4 did not solved the problem for me, all img tags are filtered out.

luthien’s picture

Issue summary: View changes

sdsdf

generalredneck’s picture

Version: 7.x-1.6-rc2 » 7.x-1.6-rc3
Issue summary: View changes

If you are like me... you are probably using the media module in conjunction with this... you need to do something like img[*] to make this work out.

pontus.froden’s picture

I have problem with images to.

Using media module and ckeditor. All images are removed from the text.

tried both
img[*]
and
img[width|height|alt|title|src]

still no success

joelpittet’s picture

img[*] resolved it for me, not sure why...

geek-merlin’s picture

Status: Active » Closed (works as designed)

So it looks like #8 fixes this.