ENHANCEMENT Marking "link" and "unlink" buttons in SilverStripe's TinyMCE as disabled if no link is selected (see 4646efe84 in sapphire for details)
This commit is contained in:
parent
7a29a4a0ca
commit
bb7edf8bfd
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue