Style Menu
Adding Style Select to Rich Text Editor
Creating a Custom Style Select Menu
{
"name": "Name of your package",
"alias": "My.Package",
"extensions": [
{
"type": "tiptapToolbarExtension",
"kind": "styleMenu",
"alias": "MyCustom.Tiptap.StyleMenu",
"name": "My Custom Tiptap Style Menu",
"meta": {
"alias": "myCustomStyleMenu",
"icon": "icon-palette",
"label": "My custom styles"
},
"items": [
{
"label": "Headings",
"items": [
{
"label": "Heading 2",
"data": { "tag": "h2" },
"appearance": { "icon": "icon-heading-2" }
},
{
"label": "Heading 3",
"data": { "tag": "h3" },
"appearance": { "style": "font-size: large;" }
},
{
"label": "Heading 4",
"data": { "tag": "h4" }
}
]
},
{
"label": "Attributes",
"items": [
{
"label": "Classes",
"data": { "class": "foo" }
},
{
"label": "IDs",
"data": { "id": "bar" }
},
{
"label": "Mixed",
"data": { "tag": "span", "class": "foo", "id": "bar" }
}
]
}
]
}
]
}
Supported HTML tags
Last updated
Was this helpful?