rename selection to selectionUpdate, add editor to event listener props

This commit is contained in:
Philipp Kühn
2021-03-09 09:50:03 +01:00
parent 789a1d5551
commit 15848473ed
7 changed files with 74 additions and 21 deletions

View File

@@ -40,8 +40,12 @@ export default class ExtensionManager {
this.editor.on('update', extension.config.onUpdate.bind(context))
}
if (typeof extension.config.onSelection === 'function') {
this.editor.on('selection', extension.config.onSelection.bind(context))
if (typeof extension.config.onSelectionUpdate === 'function') {
this.editor.on('selectionUpdate', extension.config.onSelectionUpdate.bind(context))
}
if (typeof extension.config.onViewUpdate === 'function') {
this.editor.on('viewUpdate', extension.config.onViewUpdate.bind(context))
}
if (typeof extension.config.onTransaction === 'function') {