I like to use the Drupal HTML Filter on input formats so I can specify a whitelist of HTML tags that can be input (Full HTML lets all garbage through, I don't want that).
However, this poses a problem if you want to put an image in the content, because it becomes impossible to left or right align, since it strips out most any HTML attribute by having the filter enabled, as well as any inline style. While the image could be classed to float left or right, that creates more overhead with style (what if the wrapped content isn't long enough? what if they want two images stacked?). I'd like an easy way to do this so placing images is intuitive for the end-user, and using tables is not an option.
Is there any simple way to allow HTML attributes like align, title, alt, etc without being removed? Is WYSIWYG Filter the only option here?
I know in this case the text editor does not matter, but I a开发者_如何转开发m using CK Editor 3.x too.
I believe the HTML Purifier module will give you what you're looking for.
精彩评论