js/plugins/drupalentity/plugin.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/js/plugins/drupalentity/plugin.js b/js/plugins/drupalentity/plugin.js index ce7560d..3fcf93c 100644 --- a/js/plugins/drupalentity/plugin.js +++ b/js/plugins/drupalentity/plugin.js @@ -25,7 +25,7 @@ editor.getCommand('drupalunlink').on('exec', function (evt) { var widget = getFocusedWidget(editor); - if (!widget || !widget.parts.link) { + if (!widget) { return; } @@ -43,7 +43,7 @@ return; } - this.setState(widget.data.link || widget.wrapper.getAscendant('a') ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED); + this.setState(widget.data.link ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED); evt.cancel(); }); @@ -155,7 +155,6 @@ parts: { entity: 'drupal-entity' // parts#caption is not set because it's not a separate HTML element when downcasted, just an attribute. - // parts#link is not set but defined in widget#init because it wraps the downcasted widget HTML. }, upcast: function (element, data) { @@ -187,10 +186,6 @@ this.wrapper.data('cke-display-name', Drupal.t('Embedded @buttonLabel', {'@buttonLabel': button.label})); } } - - if (this.parts.link) { - this.setData('link', CKEDITOR.plugins.image2.getLinkAttributesParser()(editor, this.parts.link)); - } }, destroy: function() { @@ -409,8 +404,4 @@ return editor.config.DrupalEntity_buttons.hasOwnProperty(button); } - CKEDITOR.plugins.drupalentity = { - getFocusedWidget: getFocusedWidget - }; - })(jQuery, Drupal, CKEDITOR);