add can method to editor class
This commit is contained in:
@@ -115,7 +115,6 @@ export class Editor extends EventEmitter {
|
||||
this.createExtensionManager()
|
||||
this.createSchema()
|
||||
this.createView()
|
||||
// this.registerCommands(coreCommands)
|
||||
this.injectCSS()
|
||||
|
||||
window.setTimeout(() => this.proxy.focus(this.options.autoFocus), 0)
|
||||
@@ -138,6 +137,13 @@ export class Editor extends EventEmitter {
|
||||
return this.commandManager.createChain()
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a command or a command chain can be executed. Without executing it.
|
||||
*/
|
||||
public can() {
|
||||
return this.commandManager.createCan()
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject CSS styles.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user