Robert Schäfer 52e0361087 Fixing pasteRules for Embeds
Apparently the default pasteRules of tiptap interfere with the
pasteRules of a Link (in our case an Embed node). Consider this example:

https://de.wikipedia.org/wiki/Yin_und_Yang

Depending on some random conditions, tiptap might parse the `_und_` to be
italic because it's wrapped with underscores (markdown syntax). The
result is:

https://de.wikipedia.org/wiki/Yin # link
_und_                             # italic
Yang                              # plain text

So let's remove the default pasteRules of `Bold`, `Strike` and `Italic`
marks respectively to prefer our Embeds. Who is copy+pasting from one
tiptap editor to another tiptap editor anyways?
2019-08-05 17:26:50 +02:00

8 lines
148 B
JavaScript

import { Italic as TipTapItalic } from 'tiptap-extensions'
export default class Italic extends TipTapItalic {
pasteRules() {
return []
}
}