Initialization, content updates, and command hooks
This page keeps the content-related callbacks that still map cleanly to the current build:
onInit, onChange, and onBeforeCommand. It also mirrors them with
native summernote.* events on the original note element.
Change target: summernote callback demo
Callback log
Ready.
Example configuration - Lifecycle and Content
summernote.create('#callbacks-lifecycle-editor', {
height: 220,
callbacks: {
onInit() {},
onChange(contents, editable) {},
onBeforeCommand(contents) {},
},
});
note.addEventListener('summernote.change', (event) => {
const [contents] = event.detail || [];
});