rename init to created

This commit is contained in:
Philipp Kühn
2020-03-07 22:54:45 +01:00
parent 25d2e0540c
commit 486d0e0f5f
3 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ export default abstract class Extension {
public type = 'extension'
protected init() {}
protected created() {}
protected bindEditor(editor: Editor): void {
this.editor = editor

View File

@@ -10,7 +10,7 @@ export default class ExtensionManager {
this.extensions = extensions
this.extensions.forEach(extension => {
extension.bindEditor(editor)
extension.init()
extension.created()
})
}

View File

@@ -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()