Tiptap extension for setting custom class of the mark.
npm install @yaskevich/extension-marker
The list of the classes available to be set via the extension.
Default: none
The list of the keyboard shortcuts in the same order as the classes.
Default: none
Example: ['Mod-q']
will set Ctrl+Q shortcut for first item.
If you would like to omit shortcut for an item, but set it for next one in list, put there an empty string.
This option works in the same manner, as it is described in Schema documentation.
'_'
excludes all other marks, 'bold'
excludes only Bold mark.
Default: marker
(excludes setting itself more than once).
The name of the tag into which the mark is rendered
Default: 'span'
It is better not to set something fancy, however, for example I use var
tag in one of my projects.
Set handler like this:
editor.chain().focus().toggleMarker({ class: 'superclass' }).run()
👾