Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

Allowing the "style" attribute #187

Open
tekin opened this issue Aug 27, 2012 · 10 comments
Open

Allowing the "style" attribute #187

tekin opened this issue Aug 27, 2012 · 10 comments

Comments

@tekin
Copy link

tekin commented Aug 27, 2012

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.

@DavidBradbury
Copy link

Inline styles = Bad news bears

@tekin
Copy link
Author

tekin commented Sep 12, 2012

@DavidBradbury not if you're using the editor for HTML emails! ;)

@DavidBradbury
Copy link

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. :)

@Bratzilla
Copy link

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.

@edslocomb
Copy link

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.

@ohhaiohhai
Copy link

Take a look at my comments on this other similiar thread:
#212

@celmanabbas
Copy link

+1 will come in handy.

@russomi
Copy link

russomi commented Nov 24, 2012

+1 -- added this commit to my local version to support inline styles.

@jaybee
Copy link

jaybee commented Nov 26, 2012

Glad someone found this useful :)

Haegin added a commit to fac/wysihtml5 that referenced this issue Nov 26, 2012
[tiff#187] adds style rule to check_attributes handling
@badzeugene
Copy link

i done this, but still not working. is this also apply to insertHtml?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants