Introduction
Marks in Yoopta Editor are text formatting options: bold, italic, underline, strike, code, highlight, and custom marks (e.g. color, font size). They are applied to the current selection or to specific blocks. Marks are registered when you create the editor and controlled via theMarks namespace.
Marks are not on the editor instance—use the
Marks namespace from @yoopta/editor. Register marks in createYooptaEditor({ marks: [...] }).Built-in marks
The@yoopta/marks package provides ready-to-use marks:
- Bold —
Cmd/Ctrl + B - Italic —
Cmd/Ctrl + I - Underline —
Cmd/Ctrl + U - Strike —
Cmd/Ctrl + Shift + S - CodeMark —
Cmd/Ctrl + E - Highlight — Text highlighting with colors
createYooptaEditor:
Using the Marks API
Apply, toggle, or query marks with theMarks namespace:
at or blockId, or a Slate selection range. See Marks API for all methods and options.
Custom marks
Define your own marks withcreateYooptaMark: give them a type, optional hotkey, and a render function. Pass the result into createYooptaEditor({ marks: [...] }).

