bustle/mobiledoc-kit

Have paste text only option to editor

Closed this issue · 4 comments

Recently been trying to default html that has been copied from a webpage (such as right-click copying a link) to paste as text. I've seen that shift-paste is supported but I think having a flag to default pasting to text only would be useful.

You might be able to accomplish that by using parserPlugins. I haven't tried this myself but probably worth experimenting if it's something you need. However, shift-paste is fairly universal for "Paste and Match Style" which basically just pastes text afaik.

After messing around with paste some more, I'll say this:
cmd-shift-v => paste plain text works OK, however it would be nice if there was some way to "paste and match styles", that is to say if I paste into a markup (for example, in the middle of an em tag), it should get any active markups when pasting. That would be cool.

@sdhull I think you're right that is the better solution and ideally the one that would help 👍

I don't think we'll add this directly. The system "paste and match style" works and there is a willPaste hook if you want to implement this.