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