improve build script

This commit is contained in:
Philipp Kühn
2020-11-10 09:21:47 +01:00
parent 0181b70bc2
commit 7d121eb39a
43 changed files with 314 additions and 240 deletions

View File

@@ -1,4 +1,4 @@
import { Plugin } from 'prosemirror-state'
import { Plugin, PluginKey } from 'prosemirror-state'
import { Slice, Fragment, MarkType } from 'prosemirror-model'
export default function (regexp: RegExp, type: MarkType, getAttrs?: (match: any) => any): Plugin {
@@ -51,6 +51,7 @@ export default function (regexp: RegExp, type: MarkType, getAttrs?: (match: any)
}
return new Plugin({
key: new PluginKey('markPasteRule'),
props: {
transformPasted: slice => {
return new Slice(handler(slice.content), slice.openStart, slice.openEnd)