add getCharacterCount method to the editor
This commit is contained in:
@@ -395,6 +395,13 @@ export class Editor extends EventEmitter {
|
||||
return JSON.stringify(defaultContent) === JSON.stringify(content)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of characters for the current document.
|
||||
*/
|
||||
public getCharacterCount() {
|
||||
return this.state.doc.content.size - 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the editor.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user