MtTextEditor component provides a full-featured rich text editor with WYSIWYG editing, code mode, and extensive formatting options.
Import
Props
The HTML content of the editor.
A label for your text editor field.
Enable inline edit mode with bubble menu.
Add disabled state to the editor.
Add placeholder text to the editor.
Control toolbar visibility. Set to false to hide the toolbar completely.
Control code editor mode. Set to true to show the code editor instead of WYSIWYG.
Custom buttons to be added to the toolbar.
Excluded buttons from the toolbar.
Add custom configuration for the TipTap editor.
An error in your business logic related to this field.
Events
Emitted when the content changes.
Emitted when switching between code and visual mode.
Slots
Custom contextual buttons in the footer. Receives
editor and buttons props.Content in the left side of the footer. Receives
editor prop.Content in the right side of the footer. Receives
editor prop. Defaults to character count.Usage
Basic Editor
With Placeholder
Inline Edit Mode
Code Mode
Custom Toolbar Buttons
Exclude Toolbar Buttons
Custom Footer Content
Without Toolbar
Features
Formatting Options
- Text: Bold, Italic, Underline, Strikethrough
- Headings: H1-H6
- Lists: Bullet lists, Numbered lists
- Alignment: Left, Center, Right, Justify
- Text Style: Superscript, Subscript, Code
- Colors: Text color picker
- Links: Insert and edit links
- Tables: Create and edit tables
- Images: Insert images
- Code blocks: Syntax highlighting
- Blockquotes: Quote formatting
- Horizontal rules: Visual separators
Editor Modes
- WYSIWYG Mode: Visual editing with toolbar
- Code Mode: Direct HTML editing with syntax highlighting
- Inline Mode: Bubble menu that appears on selection
- Fullscreen Mode: Expand editor to full screen
Accessibility
- Keyboard shortcuts for common formatting
- Screen reader support
- Focus management within editor
- ARIA labels for toolbar buttons
- Semantic HTML output
- Table navigation with arrow keys
- Link editing accessible via keyboard