verbb / vizy

A flexible visual editor for Craft CMS
Other
44 stars 8 forks source link

Add classname attribute to Link #65

Closed jmchat closed 1 year ago

jmchat commented 3 years ago

What are you trying to do? A description of what you want to happen. Currently you can not give a link a classname when you open the the link pop-up. this can be useful to give some special stying to a link.

What's your proposed solution? A description of how you think this could be solved, including any alternatives that you considered. Please add the classname attribute to the current attributes, see: https://verbb.io/craft-plugins/vizy/docs/developers/mark#link

Additional context Add any other context or screenshots about the feature request here.

engram-design commented 3 years ago

Currently, the only way to handle this is through custom rendering config:

{{ entry.vizyField.renderHtml({
    paragraph: {
        marks: {
            link: {
                merge: true,
                attrs: {
                    class: 'text-blue-500',
                },
            },
        },
    },
}) }}

We'll look at adding something customisable in the field, for each link.

engram-design commented 1 year ago

Added in 2.1.0