我正在尝试设置ckeditor5的看门狗功能。我遵循以下文档进行设置。 https://ckeditor.com/docs/ckeditor5/latest/features/watchdog.html#controlling-editor-creation-and-destruction
但是我无法调用下面的析构函数方法。我不知道如何手动调用它,或者它不会被自动调用。请更新如何触发此方法。
watchdog.setDestructor( editor => {
// Do something before the editor is destroyed.
return editor
.destroy()
.then( () => {
// Do something after the editor is destroyed.
} );
} );