update dispatchTransaction
This commit is contained in:
@@ -161,21 +161,19 @@ export class Editor extends EventEmitter {
|
|||||||
const state = this.state.apply(transaction)
|
const state = this.state.apply(transaction)
|
||||||
this.view.updateState(state)
|
this.view.updateState(state)
|
||||||
this.storeSelection()
|
this.storeSelection()
|
||||||
|
this.setActiveNodesAndMarks()
|
||||||
|
|
||||||
// this.setActiveNodesAndMarks()
|
this.emit('transaction', { transaction })
|
||||||
|
|
||||||
// this.emit('transaction', {
|
|
||||||
// getHTML: this.getHTML.bind(this),
|
|
||||||
// getJSON: this.getJSON.bind(this),
|
|
||||||
// state: this.state,
|
|
||||||
// transaction,
|
|
||||||
// })
|
|
||||||
|
|
||||||
if (!transaction.docChanged || transaction.getMeta('preventUpdate')) {
|
if (!transaction.docChanged || transaction.getMeta('preventUpdate')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.emitUpdate(transaction)
|
this.emit('update', { transaction })
|
||||||
|
}
|
||||||
|
|
||||||
|
public setActiveNodesAndMarks() {
|
||||||
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
public setContent(content: EditorContent = '', emitUpdate: Boolean = false, parseOptions: any = {}) {
|
public setContent(content: EditorContent = '', emitUpdate: Boolean = false, parseOptions: any = {}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user