1 /* Import plugin specific language pack */
2 tinyMCE.importPluginLanguagePack('ntattachlink', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');
4 var TinyMCE_NTAttachLinkPlugin = {
7 longname : 'Near-Time Attach Linker',
8 author : 'Blake Watters',
9 authorurl : 'http://thatswhatimtalkingabout.org/',
10 infourl : 'http://www.near-time.net/',
11 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
15 getControlHTML : function(cn) {
18 return tinyMCE.getButtonHTML(cn, 'lang_attach_desc', '{$themeurl}/images/attach.gif', 'mceNearTimeAttachLink');
24 execCommand : function(editor_id, element, command, user_interface, value) {
26 case "mceNearTimeAttachLink":
27 Element.hide('formatbar_image');
28 Element.hide('formatbar_link');
29 Element.toggleWithHighlight('formatbar_attach');
36 handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
41 if (node.nodeName == "A" && tinyMCE.getAttrib(node, 'href') != "") {
42 tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonSelected');
45 } while ((node = node.parentNode));
48 tinyMCE.switchClass(editor_id + '_Attachlinker', 'mceButtonNormal');
52 tinyMCE.switchClass(editor_id + '_Attachlinker', 'mceButtonDisabled');
58 tinyMCE.addPlugin("ntattachlink", TinyMCE_NTAttachLinkPlugin);