wysiwyg-editor icon indicating copy to clipboard operation
wysiwyg-editor copied to clipboard

pastePlain, imagePaste, & pasteAllowedStyleProps ignored when pasted from another Froala Editor

Open JaxonWright opened this issue 4 years ago • 7 comments

Expected behavior.

These settings should be followed regardless of where the copied text came from

Actual behavior.

If text is copied from a different Froala editor, these options are simply ignored and you now have formatting pasted in that you do not want. This is true even across webpages as long as it is in the same domain.

That means if your website has a more fully-featured editor somewhere and a more restricted one somewhere else, the user can paste stuff that shouldn't be allowed from the first one to that one.

Steps to reproduce the problem.
  1. copy rich text within one editor
  2. paste it into another editor that does not allow that styling
  3. Observe that the styling was preserved!

Here is an example JSFiddle: https://jsfiddle.net/4j0ufLdb/17/

Notice that formatting is stripped when pasting the text at the bottom of the page into either editor, but it is not when pasting the rich text between editor 1 and 2.

Editor version.

v3.1.0

OS.

Windows 10

Browser.

Chrome, Firefox, probably more

JaxonWright avatar Jan 20 '20 19:01 JaxonWright