Hey there,
Milan was on the right track. The default Xperience Link plugin is customizable, and custom styling for links is definitely possible. However, you need to include not just the linkStyles option, but also the linkEditButtons option with the linkStyle included in your inline editor's configuration (the default configuration omits linkStyle).
To just simply extend the example from the documentation:
(function (pageBuilder) {
var richTextEditor = pageBuilder.richTextEditor = pageBuilder.richTextEditor || {};
var configurations = richTextEditor.configurations = richTextEditor.configurations || {};
// Overrides the "default" configuration of the Rich text widget, assuming you have not specified a different configuration
// The below configuration adds the h5 and h6 values to the paragraphFormat and removes the code value. Also sets the toolbar to be visible without selecting any text.
configurations["default"] = {
toolbarVisibleWithoutSelection: true,
paragraphFormat: {
N: "Normal",
H1: "Headline 1",
H2: "Headline 2",
H3: "Headline 3",
H4: "Headline 4",
H5: "Headline 5",
H6: "Headline 6",
},
"linkStyles": {
"class1": "CTA - orange",
"class2": "Text - orange"
},
"linkEditButtons": ["linkOpen", "linkStyle", "linkEdit", "linkRemove"]
}
})(window.kentico.pageBuilder);
If you want to see the styles applied also when working in the editor (and not just on the live site), don't forget to add the desired custom CSS to the rich text editor.