Closed DmitryFX closed 5 months ago
You can't put data-fred-name="link_adress"
and data-fred-rte="true"
on an anchor as that will trigger two different behaviors. You would need to do one or the other.
If you want the link to be fully editable with MCE, how I will generally set that up is something like
<span data-fred-name="link" data-fred-rte="true" data-fred-rte-config="cta"><a href="example.com">Insert Link</a></span>
Then I will set the CTA RTE Config up like this example:
{
"theme": "inlite",
"inline": true,
"plugins": "link contextmenu code",
"selection_toolbar": "bold italic | link | code",
"valid_elements": "a[href|target|class],br,strong,em,span"
}
I have an element with custom RTE config to easily edit links.
The link attributes are updated, when closing RTE editor:
But not saved after saving the page and refreshing or viewing it in the regular web context. Href attr is switched back to default empty state: