Cursor and selection
Cursor and selection extensions show where the cursor, the selection, and dragged content are, and let the cursor reach places it otherwise can't.
When you use them
- Dragging content. Dropcursor shows a cursor where dragged content will be dropped.
- Reaching gaps. Gapcursor lets the cursor stop where no regular selection is possible, for example after a table at the end of a document.
- Showing the current node. Focus adds a class to the node that has the cursor,
has-focusby default. - Keeping the selection visible. Selection adds a class to the selection while the editor is blurred,
selectionby default.
How they work
- They are extensions. They don't add nodes or marks to the document; they change how the cursor and the selection behave and look. Extensions
- Two come with the StarterKit. Dropcursor and Gapcursor are part of the StarterKit; Focus and Selection you add yourself.
- You style them. Focus and Selection only add a CSS class, and the styling is up to you. Dropcursor needs CSS too, and has settings for its color, width, and class.
Related
- Menus and handles adds a drag handle to move blocks.
- Real-time collaboration shows the carets and selections of other people.