TorstenDittmann / OmniaWrite

A text editor engineered for creative writing.
https://OmniaWrite.com
Apache License 2.0
161 stars 34 forks source link

Text pasted from other apps is not sanitized #64

Closed ghost closed 4 years ago

ghost commented 4 years ago

Describe the bug When text or "content" is pasted into the editor from another app (browser, Word, VS Code, etc) its formatting is imported along with it, even if the editor does not support it.

To Reproduce

  1. Select some content from a website, and paste it into a paragraph.
  2. Observe that the text keeps its original formatting, and elements like links, images and videos are displayed inside OmniaWrite.
  3. Switch scenes back and forth; the content is eventually sanitized.

Expected behavior Pasted text should be scrubbed of all unsupported formatting, i.e all tags except \, \, \. Line breaks should also be handled somehow, as they are (currently) not allowed inside paragraphs.

Screenshots image

TorstenDittmann commented 4 years ago

Fixed 🥳