Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ueberdosis/tiptap/llms.txt
Use this file to discover all available pages before exploring further.
Custom Marks
Marks are inline styles that can be applied to text, like bold, italic, underline, or links. Unlike nodes which are structural, marks are formatting that can be toggled on and off for portions of text.Understanding Marks
The Mark class extends the Extendable class and provides functionality for inline formatting.packages/core/src/Mark.ts:146
Creating a Simple Mark
Let’s start with the bold mark.packages/extension-bold/src/bold.tsx:56
Mark with Attributes
Here’s the highlight mark that demonstrates using attributes.packages/extension-highlight/src/highlight.ts:57
Simple Italic Mark
The italic mark shows a minimal implementation.packages/extension-italic/src/italic.ts:58
Mark Properties
Marks have several important properties that control their behavior.packages/core/src/Mark.ts:25
Mark Attributes
Attributes allow marks to store additional data.packages/core/src/Mark.ts:130
Mark Input Rules
Input rules automatically apply marks based on text patterns.Mark Paste Rules
Paste rules apply marks when content is pasted.Exitable Marks
Some marks should be easy to exit with arrow keys.packages/core/src/Mark.ts:159
Mark Exclusion
Some marks cannot coexist with others.packages/core/src/Mark.ts:42
TypeScript Commands
Add type-safe commands to your mark.packages/extension-highlight/src/highlight.ts:19
Extending Marks
You can extend existing marks to customize behavior.packages/core/src/Mark.ts:191
Marks are ideal for inline formatting that can be toggled on and off. Use Nodes for block-level content and Extensions for editor-wide functionality.
Next Steps
Custom Nodes
Create custom block content
Styling
Style your editor and content