File: fckplugin.js

package info (click to toggle)
moin 1.5.3-1.2etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 20,692 kB
  • ctags: 26,801
  • sloc: python: 32,907; java: 10,704; perl: 1,424; php: 642; makefile: 172; xml: 162; sh: 121; sed: 5
file content (31 lines) | stat: -rw-r--r-- 1,206 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var oMacroItem;

if (1 || !FCKBrowserInfo.IsIE){

// Register the related command.
FCKCommands.RegisterCommand('Macro', new FCKDialogCommand('Macro', FCKLang.MacroDlgTitle, FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=macro', 440, 300, FCKSelection.CheckForNodeNames, noFormat));

oMacroItem = new FCKToolbarButton('Macro', FCKLang.MacroBtn, null, 
                                      null, false, true);
}
else
{
FCKCommands.RegisterCommand('Macro', new FCKDialogCommand('Macro', FCKLang.MacroDlgTitle, FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=macro', 440, 300, null, null));
oMacroItem = new FCKToolbarButton('Macro', FCKLang.MacroBtn, null, 
                                      null, false, false);
}

// Create the "Macro" toolbar button.
oMacroItem.IconPath = FCKPlugins.Items['macro'].Path + 'macro.gif';
FCKToolbarItems.RegisterItem('Macro', oMacroItem);


// The object used for all Macro operations.
var FCKMacros = new Object();

// Add a new macro at the actual selection.
FCKMacros.Add = function(name)
{
  var oSpan = FCK.InsertHtml('<span style="background-color:#ffff11">[['
                             + name + ']]</span>');
}