mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
This commit is contained in:
parent
35a4eef87b
commit
583ae0385b
@ -1106,7 +1106,12 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
}
|
||||
|
||||
function onPasteAsText() {
|
||||
pasteAsPlainText(null);
|
||||
// clipboard.readText returns Markdown instead of text when copying content from
|
||||
// the Rich Text Editor. When the user "Paste as text" he does not expect to see
|
||||
// anything besides text, that is why we are stripping here before pasting
|
||||
// https://github.com/laurent22/joplin/pull/8351
|
||||
const clipboardWithoutMarkdown = stripMarkup(MarkupToHtml.MARKUP_LANGUAGE_MARKDOWN, clipboard.readText());
|
||||
pasteAsPlainText(clipboardWithoutMarkdown);
|
||||
}
|
||||
|
||||
editor.on(TinyMceEditorEvents.KeyUp, onKeyUp);
|
||||
|
Loading…
Reference in New Issue
Block a user