-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strip html on paste #86
Comments
Currently no. You could catch the paste event and insert your own html removal code, or there's always the clear formatting button currently in the toolbar (the 'ban' symbol, or circle with a line through). Possibly this could be added as on option later. |
I had a similar issue this morning. I managed a workaround in for now, but definitely look forward to having this as an option. |
Hi, could I get some more information on what you wanted stripped out. Some specific examples would be useful as then I can create tests that cover actual use cases rather than something I made up that should work! As I see it there are 2 ways of implementing this, depending on requirements. The first is to use the sanitizer that runs on every update on the pasted in code, the other is to do something like strip all tags out and only insert in a text string. |
Again, for stripping out all html and leaving only text, the innerText value delivers a lot for free. |
Would appreciate a temporary solution. Right now got stucked on it and haven't found one, yet :/ My need for this feature would be: |
Most recent commit to the Repo does this, I've only included it on the contenteditable div, ie wysiwyg mode. Thanks to @worldspawn for the innerText tip. |
Right now when I paste content from a different website it does not strip the html from that content. Is there a way to implement strip html on paste?
The text was updated successfully, but these errors were encountered: