Open armellarcier opened 3 years ago
I don't understand @armellarcier. What are the future improvements?
@jacquesbh pasting could keep tags that are allowed (h1
,…) and only sanitize the rest instead of just pasting only raw text from the clipboard.
Again, this could be part of a bigger issue/feature on the mere possibility to completely customize the editor.
Yes. I agree with you but it's too complicated to do so. Especially if we allow more tags and allow to change the default options of the editor.
Also, a tag is not only <h1>
but could be <h1 id="…" class="…" data-*="…" …>
etc.
So I think we will keep it this way and we won't improve the pasting by allowing some tags. Unless somebody wants to provide a full PR for it, for me this subject is a no go right now.
Sorry.
I always end up with such saved code when pasting text in the pell Wysiwyg editor.
I think this should be cleaned up automatically without any user configuration needed as it seems to be the philosophy of this plugin to prevent UI breaking due to bad "client" content management. And it would be a security improvement.
Could be done through JS sanitizing on
change
events, onpaste
events (downvote from me) with a lib like https://github.com/apostrophecms/sanitize-html, and/or server-side.It may be good to override the behavior and allow a specific list of tags/attributes in userland also.
https://github.com/jaredreich/pell/issues/53