rename init to created
This commit is contained in:
@@ -18,7 +18,7 @@ export default abstract class Extension {
|
||||
|
||||
public type = 'extension'
|
||||
|
||||
protected init() {}
|
||||
protected created() {}
|
||||
|
||||
protected bindEditor(editor: Editor): void {
|
||||
this.editor = editor
|
||||
|
||||
@@ -10,7 +10,7 @@ export default class ExtensionManager {
|
||||
this.extensions = extensions
|
||||
this.extensions.forEach(extension => {
|
||||
extension.bindEditor(editor)
|
||||
extension.init()
|
||||
extension.created()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ export default class History extends Extension {
|
||||
|
||||
name = 'history'
|
||||
|
||||
init() {
|
||||
created() {
|
||||
this.editor.registerCommand('undo', (next, { view }) => {
|
||||
undo(view.state, view.dispatch)
|
||||
next()
|
||||
|
||||
Reference in New Issue
Block a user