Create, save, and restore selection ranges
Select a word or sentence inside the editor, then use the buttons below. This example keeps
createRange, saveRange, and restoreRange together because they are most useful as one workflow.
Select text in this sentence, click Save range, move the caret somewhere else, and then click Restore range.
This lets dialogs and other UI actions come back to the original text selection.
Range output
Ready.
Example configuration - Selection and Range
summernote.create('#selection-range-editor', {
height: 260,
});
const range = summernote.invoke('#selection-range-editor', 'createRange');
summernote.invoke('#selection-range-editor', 'saveRange');
summernote.invoke('#selection-range-editor', 'restoreRange');