Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
BMorse CreditAttribution: BMorse commentedWhat 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.
Comment #2
Eric_A CreditAttribution: Eric_A commentedI 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.
Comment #3
pminfSame 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".
Comment #4
pminfProblem solved for me. I was missing
img[width|height|alt|title|src]
in my whitelist.Comment #5
luthien CreditAttribution: luthien commented#4 did not solved the problem for me, all img tags are filtered out.
Comment #5.0
luthien CreditAttribution: luthien commentedsdsdf
Comment #6
generalredneckIf 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.Comment #7
pontus.froden CreditAttribution: pontus.froden as a volunteer commentedI 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
Comment #8
joelpittetimg[*]
resolved it for me, not sure why...Comment #9
geek-merlinSo it looks like #8 fixes this.