diff --git a/javascript/tinymce_ssbuttons/editor_plugin_src.js b/javascript/tinymce_ssbuttons/editor_plugin_src.js index cfeeebd1..0b0892b1 100644 --- a/javascript/tinymce_ssbuttons/editor_plugin_src.js +++ b/javascript/tinymce_ssbuttons/editor_plugin_src.js @@ -37,8 +37,10 @@ jQuery('#Form_EditorToolbarFlashForm')[0].open(); }); - ed.onNodeChange.add(function(ed, o) { - jQuery('Form_EditorToolbarLinkForm').entwine('ss').updateSelection(); + ed.onNodeChange.add(function(ed, cm, n, co) { + cm.setDisabled('sslink', co && n.nodeName != 'A'); + cm.setActive('sslink', n.nodeName == 'A' && !n.name); + jQuery('Form_EditorToolbarLinkForm').entwine('ss').respondToNodeChange(); }); }