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
|
||||
|
||||
@@ -55,10 +55,12 @@ export const CollaborationCursor = Extension.create<CollaborationCursorOptions,
|
||||
},
|
||||
render: user => {
|
||||
const cursor = document.createElement('span')
|
||||
|
||||
cursor.classList.add('collaboration-cursor__caret')
|
||||
cursor.setAttribute('style', `border-color: ${user.color}`)
|
||||
|
||||
const label = document.createElement('div')
|
||||
|
||||
label.classList.add('collaboration-cursor__label')
|
||||
label.setAttribute('style', `background-color: ${user.color}`)
|
||||
label.insertBefore(document.createTextNode(user.name), null)
|
||||
|
||||
@@ -14,6 +14,7 @@ export function updateColumns(node: ProseMirrorNode, colgroup: Element, table: E
|
||||
for (let j = 0; j < colspan; j += 1, col += 1) {
|
||||
const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j]
|
||||
const cssWidth = hasWidth ? `${hasWidth}px` : ''
|
||||
|
||||
totalWidth += hasWidth || cellMinWidth
|
||||
|
||||
if (!hasWidth) {
|
||||
@@ -34,6 +35,7 @@ export function updateColumns(node: ProseMirrorNode, colgroup: Element, table: E
|
||||
|
||||
while (nextDOM) {
|
||||
const after = nextDOM.nextSibling
|
||||
|
||||
nextDOM.parentNode.removeChild(nextDOM)
|
||||
nextDOM = after
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ class ReactNodeView extends NodeView<React.FunctionComponent, Editor, ReactNodeV
|
||||
}
|
||||
|
||||
let as = this.node.isInline ? 'span' : 'div'
|
||||
|
||||
if (this.options.as) {
|
||||
as = this.options.as
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ export class VueRenderer {
|
||||
|
||||
// prevents `Avoid mutating a prop directly` error message
|
||||
const originalSilent = Vue.config.silent
|
||||
|
||||
Vue.config.silent = true
|
||||
|
||||
Object
|
||||
|
||||
Reference in New Issue
Block a user