What is the URL?
Relevant URL: not project-specific. It happens on any Structured Text field where a plugin adds custom marks. Happy to share a private link by email if you need to see our project.
What is the issue?
I need help with: custom mark buttons in the Structured Text toolbar, which shrink on hover, and their SVG icons, which only render a single <path>.
We have a private plugin (datocms-plugin-sdk 2.5.0) that adds two text color marks to Structured Text fields through customMarksForStructuredTextField.
1. Custom mark buttons shrink on hover
Our custom mark buttons shrink when hovered. The native buttons (bold, italic, highlightâŠ) donât. The plugin ships no CSS: it only returns { id, label, icon, appliedStyle }. It happens with a Font Awesome icon name ('palette', 'circle') and with a custom SVG icon alike.
Steps to reproduce:
- Install a plugin that returns custom marks from
customMarksForStructuredTextField - Open a record with a Structured Text field where those marks are enabled
- Hover the custom mark buttons in the toolbar: they shrink, the native ones donât
2. SVG icons: only one <path> is rendered, colors are dropped
We tried a âtext colorâ icon: a letter path plus a colored bar under it. Only the letter showed up. The <rect> and its fill color were dropped:
{
id: 'red',
label: 'Rouge',
icon: {
type: 'svg',
viewBox: '0 0 24 24',
content: '<path fill="currentColor" d="..."/><rect x="4" y="18.5" width="16" height="3.5" rx="1" fill="#e80000"/>',
},
appliedStyle: { color: '#e80000' },
}
We worked around it with single-path, single-color icons (one letter per mark). Could you confirm which SVG elements and attributes are supported in toolbar icons?
Browser: Chrome 158.0.8127.88 (x86_64)
Thanks!
