From 3c2675908dc74c49de48d6ac48c57c58fabbc967 Mon Sep 17 00:00:00 2001 From: Serhey Dolgushev Date: Thu, 16 Jan 2020 10:43:06 +0000 Subject: [PATCH] EZP-31296: As an Editor I want be able to edit custom attributes and styles for links --- .../public/js/alloyeditor/src/toolbars/config/ez-link.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bundle/Resources/public/js/alloyeditor/src/toolbars/config/ez-link.js b/src/bundle/Resources/public/js/alloyeditor/src/toolbars/config/ez-link.js index c75ec38f08..5c046296d7 100644 --- a/src/bundle/Resources/public/js/alloyeditor/src/toolbars/config/ez-link.js +++ b/src/bundle/Resources/public/js/alloyeditor/src/toolbars/config/ez-link.js @@ -3,7 +3,12 @@ import AlloyEditor from 'alloyeditor'; export default class EzLinkConfig { constructor(config) { this.name = 'link'; - this.buttons = ['ezlinkedit', ...config.extraButtons[this.name]]; + + this.buttons = [ + 'ezlinkedit', + config.attributes[this.name] || config.classes[this.name] ? `${this.name}edit` : '', + ...config.extraButtons[this.name] + ]; this.test = AlloyEditor.SelectionTest.link; }