2 * $Id: editor_plugin_src.js 539 2008-01-14 19:08:58Z spocke $
\r
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
\r
9 tinymce.create('tinymce.plugins.AdvancedLinkPlugin', {
\r
10 init : function(ed, url) {
\r
13 // Register commands
\r
14 ed.addCommand('mceAdvLink', function() {
\r
15 var se = ed.selection;
\r
17 // No selection and not in link
\r
18 if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A'))
\r
21 ed.windowManager.open({
\r
22 file : url + '/link.htm',
\r
23 width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)),
\r
24 height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)),
\r
32 ed.addButton('link', {
\r
33 title : 'advlink.link_desc',
\r
37 ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink');
\r
39 ed.onNodeChange.add(function(ed, cm, n, co) {
\r
40 cm.setDisabled('link', co && n.nodeName != 'A');
\r
41 cm.setActive('link', n.nodeName == 'A' && !n.name);
\r
45 getInfo : function() {
\r
47 longname : 'Advanced link',
\r
48 author : 'Moxiecode Systems AB',
\r
49 authorurl : 'http://tinymce.moxiecode.com',
\r
50 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
\r
51 version : tinymce.majorVersion + "." + tinymce.minorVersion
\r
57 tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin);
\r