feat: Add extension storage (#2069)
This commit is contained in:
@@ -50,6 +50,8 @@ export class Editor extends EventEmitter<EditorEvents> {
|
||||
|
||||
public isFocused = false
|
||||
|
||||
public extensionStorage: Record<string, any> = {}
|
||||
|
||||
public options: EditorOptions = {
|
||||
element: document.createElement('div'),
|
||||
content: '',
|
||||
@@ -100,6 +102,13 @@ export class Editor extends EventEmitter<EditorEvents> {
|
||||
}, 0)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the editor storage.
|
||||
*/
|
||||
public get storage(): Record<string, any> {
|
||||
return this.extensionStorage
|
||||
}
|
||||
|
||||
/**
|
||||
* An object of all registered commands.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user