Range and selection examples for the Bootstrap 5 vanilla build

These pages translate the still-useful parts of 06-range-selection-api.html to the current public editor API and the currently exposed summernote.summernote.range utility.

Editor Range State

Inspect editor.createRange, getLastRange, saveRange, and restoreRange.

Construct Custom Ranges

Build explicit selections with summernote.summernote.range and place the caret around nodes.

Content Transforms

Use low-level range helpers for deletion, node insertion, pasted markup, and paragraph wrapping.

Word Ranges and Rects

Extract a word, match a mention with regex, and inspect the resulting client rects.