Allowing the "style" attribute #187
Comments
Inline styles = Bad news bears |
@DavidBradbury not if you're using the editor for HTML emails! ;) |
I'd argue that HTML e-mails are broken entities in themselves! That said, I will admit there is an inherent usefulness in being able to allow inline styles even if it makes me grumble about style/content separation and semantics. :) |
I agree with the OP. There's what is in theory "perfect" practice, and then there's the "real world." Inline styles may be bad news, but unfortunately there are cases where using the class approach may not be feasible. In addition to HTML email, there is also the issue with people who may want to use this editor who already have a database full of articles, etc., with inline styles. Unless there is another approach (and I'd love to hear it), I cannot fathom someone slogging through hundreds of not thousands of entries trying to fix all that. At the very least, inline styles should be an option. |
We're in the situation Bratzilla describes; we've got a lot of documents in our database that use <style> tags and define class names ad-hoc therein. And some that use style="" attributes. And some that use both. None of these will survive a trip through wysihtml5's parser. |
Take a look at my comments on this other similiar thread: |
+1 will come in handy. |
+1 -- added this commit to my local version to support inline styles. |
Glad someone found this useful :) |
[tiff#187] adds style rule to check_attributes handling
i done this, but still not working. is this also apply to insertHtml? |
Looking through how the library works, it doesn't look like there is a clear way to allow the style attribute on tags. Is this the case? I Just want to check before I dive in and try and patch things.
The text was updated successfully, but these errors were encountered: