fix more linting errors

This commit is contained in:
Philipp Kühn
2020-09-24 00:29:05 +02:00
parent aefb4ca8e6
commit ac33eb483e
106 changed files with 310 additions and 274 deletions

View File

@@ -1,5 +1,5 @@
import { Command } from '../Editor'
import { TextSelection } from 'prosemirror-state'
import { Command } from '../Editor'
type SetContentCommand = (
content: string,
@@ -18,7 +18,7 @@ export const setContent: SetContentCommand = (content = '', emitUpdate = false,
const { doc } = tr
const document = createDocument(content, parseOptions)
const selection = TextSelection.create(doc, 0, doc.content.size)
tr.setSelection(selection)
.replaceSelectionWith(document, false)
.setMeta('preventUpdate', !emitUpdate)