nuwainfo / tibetaneditor

Working repository for a simple Tibetan editor with a segmenter, spellchecker, rule editor, concordancer and more.
2 stars 3 forks source link

Use insertPlainText() for Copy/Paste #16

Closed thedirk closed 6 years ago

thedirk commented 6 years ago

Issue: Copy / Paste copies fonts & styles — this causes a fatal error when trying to re-segment, and can mess up the color of list highlighting...

Expected behavior: Paste copies only the "plain text" of the original, and puts it in the format of the Editor

thedirk commented 6 years ago

screenshot 48

un-spacing converts old plain text into the new, pasted format!

screenshot 49

top: plain text, as entered in the editor itself below: copy/paste brings a new font and new color into the mix

screenshot 50

after copying & pasting colored text with a different font, trying to re-segment (scissors icon) creates a fatal error

kevinhuangtw commented 6 years ago

Now the editor will accept plain text (discard format) when pasting sentences.