rename function
This commit is contained in:
@@ -51,7 +51,7 @@ export default class Editor {
|
|||||||
this.state = this.createState()
|
this.state = this.createState()
|
||||||
this.view = this.createView()
|
this.view = this.createView()
|
||||||
this.commands = this.createCommands()
|
this.commands = this.createCommands()
|
||||||
this.getActiveNodesAndMarks()
|
this.setActiveNodesAndMarks()
|
||||||
this.options.onInit({
|
this.options.onInit({
|
||||||
view: this.view,
|
view: this.view,
|
||||||
state: this.state,
|
state: this.state,
|
||||||
@@ -189,7 +189,7 @@ export default class Editor {
|
|||||||
dispatchTransaction(transaction) {
|
dispatchTransaction(transaction) {
|
||||||
this.state = this.state.apply(transaction)
|
this.state = this.state.apply(transaction)
|
||||||
this.view.updateState(this.state)
|
this.view.updateState(this.state)
|
||||||
this.getActiveNodesAndMarks()
|
this.setActiveNodesAndMarks()
|
||||||
|
|
||||||
if (!transaction.docChanged) {
|
if (!transaction.docChanged) {
|
||||||
return
|
return
|
||||||
@@ -244,7 +244,7 @@ export default class Editor {
|
|||||||
}, emitUpdate)
|
}, emitUpdate)
|
||||||
}
|
}
|
||||||
|
|
||||||
getActiveNodesAndMarks() {
|
setActiveNodesAndMarks() {
|
||||||
this.activeMarks = Object
|
this.activeMarks = Object
|
||||||
.entries(this.schema.marks)
|
.entries(this.schema.marks)
|
||||||
.reduce((marks, [name, mark]) => ({
|
.reduce((marks, [name, mark]) => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user