Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using the The filter with CKEditor
When in un-filtered mode output is:
<img alt="" class="media-image" style="margin-left: 20px; margin-right: 20px; margin-top: 20px; margin-bottom: 20px; float: left; width: 320px; height: 239px; " typeof="foaf:Image" src="http://domain.com/sites/beta.com/files/styles/large/public/Wang_Family_Courtyard_1.jpg" />
When the filter is on the output is:<img alt="" style="float:left; width:320px; height:239px" typeof="Image" src="http://domain.com/sites/beta.com/files/styles/large/public/Wang_Family_Courtyard_1.jpg" />
My HTML elements in the white list box is set to:
a[!href|target<_blank|title],
div[align<center?justify?left?right],
p[align<center?justify?left?right],
br,span,em,strong,cite,code,blockquote,ul,ol,li,dl,dt,dd,
img[!src|alt|title|style|width|height|margin-left|margin-right|margin-top|margin-bottom|float|class|typeof],
@[class|style|title]
Screen shot of other settings attached.
Looked at -- http://drupal.org/node/454408 and http://drupal.org/node/760720
Comment | File | Size | Author |
---|---|---|---|
WYSIWYG Filtered HTML.png | 905.59 KB | HyperGlide |
Comments
Comment #0.0
HyperGlide CreditAttribution: HyperGlide commentedAdd code tag
Comment #0.1
HyperGlide CreditAttribution: HyperGlide commentedAdded code tags
Comment #1
geek-merlinthank you for your bug report.
i wished most bug reporters did provide relevant information so thoroughly!
this is simple, in fact you just mixed something up:
"margin-left; margin-right; margin-top; float"
are all *style attributes*!
so
* tick the corresponding checkboxes at style-attributes
* and remove them from the element attributes
see it?
you owe me a beer ;-)
of course feel free to reopen if this does not solve your issue...!
Comment #2
HyperGlide CreditAttribution: HyperGlide commentedYou are most welcome! -- Wish I could send you a case of beer as your support and this module is a big help to keep our site looking more uniform.
I did make the following changes to the advance box.
For "* tick the corresponding checkboxes at style-attributes" I did not see any attributes below that were a direct match. Referring to under
Box properties
?On loading the admin page the following errors appear at the top:
I know this is all related, and is not a bug, so changed to support request.
Thanks!
Comment #2.0
HyperGlide CreditAttribution: HyperGlide commentedcode tags was wrong
Comment #3
RAWDESK CreditAttribution: RAWDESK for Colruyt Group Services commentedThanks #1.
For the p tag style attribute, we had to add style like this
p[style|align<center?justify?left?right]
and tick text-align and text-decoration in the text properties.
This alternative was obviously / confusingly not working somehow:
p[style<text-align|align<center?justify?left?right]
Could not get the
<u>
tag be allowed inside HTML elements and attributes though.At admin/config/content/wysiwyg/profile/wysiwyg/edit (on CKEditor 4.4.3.fd4f17c), we ticked "Underline", but it's not allowed by the filter
Any suggestions about that ?