You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently you can whitelist attributes with the attributesWhitelist ... but what if you want to allow all attributes except (say) style attributes? You might want to do this to prevent pasted-in HTML from containing any styles (eg. color: white), as they might not look good on the page, but you don't want to lose any other important attributes. Unfortunately, there's no way to do it.
Also, what if you only care about pasted-in HTML? For tags there are the two options pasteTagsBlacklist and pasteTagsWhitelist, but for attributes no such option exists.
Describe the solution you'd like
My proposed new option would work exactly like pasteTagsBlacklist, only for attributes instead of tags. Which is to say it would work like attributesWhitelist, only in reverse (being a blacklist), and it would only screen out attributes from pasted-in text.
Describe alternatives you've considered
It seems impossible (or at least extremely difficult) to otherwise prevent style attributes from being pasted-in, without having to list out every other possible attribute in the entire HTML spec.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently you can whitelist attributes with the
attributesWhitelist
... but what if you want to allow all attributes except (say)style
attributes? You might want to do this to prevent pasted-in HTML from containing any styles (eg.color: white
), as they might not look good on the page, but you don't want to lose any other important attributes. Unfortunately, there's no way to do it.Also, what if you only care about pasted-in HTML? For tags there are the two options
pasteTagsBlacklist
andpasteTagsWhitelist
, but for attributes no such option exists.Describe the solution you'd like
My proposed new option would work exactly like
pasteTagsBlacklist
, only for attributes instead of tags. Which is to say it would work likeattributesWhitelist
, only in reverse (being a blacklist), and it would only screen out attributes from pasted-in text.Describe alternatives you've considered
It seems impossible (or at least extremely difficult) to otherwise prevent
style
attributes from being pasted-in, without having to list out every other possible attribute in the entire HTML spec.Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: