Toolbar dropdown example
Within markdown editor toolbar
How it looks
(preview)
How to call this example
<div class="app-c-markdown-editor__toolbar">
<markdown-toolbar class="app-c-markdown-editor__toolbar-group" for="markdown-editor">
<%= render "components/toolbar_dropdown", {
title: "Insert...",
align: "right",
items: [
{
text: "Image",
href: "#",
target: "_blank",
data_attributes: {
module: "inline-image-modal",
"modal-action": "open"
}
},
{
text: "Contact",
button_options: {
value: "add_contact",
name: "submit"
}
}
]
} %>
</markdown-toolbar>
</div>