add newline-after-var rule to eslint config
This commit is contained in:
@@ -281,6 +281,7 @@ export class Editor extends EventEmitter<EditorEvents> {
|
||||
// Let’s store the editor instance in the DOM element.
|
||||
// So we’ll have access to it for tests.
|
||||
const dom = this.view.dom as HTMLElement
|
||||
|
||||
dom.editor = this
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ export const undoInputRule: RawCommands['undoInputRule'] = () => ({ state, dispa
|
||||
|
||||
if (undoable.text) {
|
||||
const marks = tr.doc.resolve(undoable.from).marks()
|
||||
|
||||
tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks))
|
||||
} else {
|
||||
tr.delete(undoable.from, undoable.to)
|
||||
|
||||
@@ -7,6 +7,7 @@ export default function getHTMLFromFragment(fragment: Fragment, schema: Schema):
|
||||
|
||||
const temporaryDocument = document.implementation.createHTMLDocument()
|
||||
const container = temporaryDocument.createElement('div')
|
||||
|
||||
container.appendChild(documentFragment)
|
||||
|
||||
return container.innerHTML
|
||||
|
||||
@@ -37,6 +37,7 @@ export default function nodeInputRule(config: {
|
||||
|
||||
// insert last typed character
|
||||
const lastChar = match[0][match[0].length - 1]
|
||||
|
||||
tr.insertText(lastChar, start + match[0].length - 1)
|
||||
|
||||
// insert node from input rule
|
||||
|
||||
Reference in New Issue
Block a user