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

CommentFileSizeAuthor
WYSIWYG Filtered HTML.png905.59 KBHyperGlide
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HyperGlide’s picture

Issue summary: View changes

Add code tag

HyperGlide’s picture

Issue summary: View changes

Added code tags

geek-merlin’s picture

Status: Active » Fixed

thank 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...!

HyperGlide’s picture

Category: bug » support
Status: Fixed » Active

You 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.

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|class|typeof],
@[class|style|title]

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:

The class attribute is used in your HTML elements and attributes rules. You should specify the Rules for Class Names field in the "Advanced rules" section below. Leaving it unspecified will result in all class attributes filtered out.
The style attribute is used in your HTML elements and attributes rules, and you have enabled one of the following style properties: "background", "background-image", "list-style" or "list-style-image". You should specify the Rules for URLs used within inline styles field in the "Advanced rules" section below. Leaving it unspecified will result in all URLs used within inline styles filtered out.

I know this is all related, and is not a bug, so changed to support request.

Thanks!

HyperGlide’s picture

Issue summary: View changes

code tags was wrong

RAWDESK’s picture

Issue summary: View changes

Thanks #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 ?