Prepend extension slot in TipTap style menu #20781
Replies: 3 comments 2 replies
-
|
@leekelleher would it make sense to apply other custom markup instead on icon, e.g. a symbol (although this could just be part of text). |
Beta Was this translation helpful? Give feedback.
-
|
Emojis is an option, but may not always fit in the specific project + browsers render emojis different
|
Beta Was this translation helpful? Give feedback.
-
|
@bjarnef With the the Tiptap toolbar menu items, they default to use At the stage of wanting customisations to the menu-item, you could define your own web-component and reference that in the Tiptap menu's manifest, e.g. {
label: "Bullet Secondary",
data: { tag: "ol", class: "list-primary" },
elementName: "my-custom-menu-item", // to note, the `element: () => import()` equivalent hasn't been implemented yet.
}Although, now that I'm revisiting this code, I'm noticing that the Tiptap style-menu API (and |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I had a look at extension using custom style menu in TipTap:
https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/style-menu
https://forum.umbraco.com/t/tiptap-extension-to-change-color-style-of-bullets/6615
I think I can only have a single tag per item, although same CSS class should be applied.
Should "tag" allow an array to match multiple elements (or split by comma)?
Besides that and besides icon, perhaps an extension the adjust "prepend".
In this use-use I could style element text color, but not ideal when
#ffffffis an option 😅E.g. a swatch preview in front of text.
I made a "hack" in DOM in "icon" slot to visualize this:
Beta Was this translation helpful? Give feedback.
All reactions