Project

General

Profile

1
/*
2
*   Syntax Highlighter 2.0 plugin for FCKEditor
3
*   ========================
4
*   Copyright (C) 2008  Darren James
5
*   Email : darren.james@gmail.com
6
*   URL : http://www.psykoptic.com/blog/
7
*
8
*   NOTE:
9
*   ========================
10
*   This plugin will add or edit a formatted <pre> tag for FCKEditor
11
*   To see results on the front end of your website
12
*   You will need to install SyntaxHighlighter 2.0.x from
13
*   http://alexgorbatchev.com/wiki/SyntaxHighlighter
14
*
15
*
16
*   This program is free software: you can redistribute it and/or modify
17
*   it under the terms of the GNU General Public License as published by
18
*   the Free Software Foundation, either version 3 of the License, or
19
*   (at your option) any later version.
20

    
21
*   This program is distributed in the hope that it will be useful,
22
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
23
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
*   GNU General Public License for more details.
25

    
26
*   You should have received a copy of the GNU General Public License
27
*   along with this program.  If not, see <http:*www.gnu.org/licenses/>.
28

    
29
*   This program comes with ABSOLUTELY NO WARRANTY.
30
*/
31

    
32

    
33
// Register the related command.
34

    
35
/*
36
NOTE - Values are case sensitive
37
- syntaxhighlight2: name of the plugin and directory name (must be the same!)
38
- SyntaxHighLight2: Name of command used to identify the new toolbar button
39
*/
40

    
41
FCKCommands.RegisterCommand('SyntaxHighLight2', new FCKDialogCommand('SyntaxHighLight2', FCKLang.DlgSyntaxhighlightTitle, FCKPlugins.Items['syntaxhighlight2'].Path + 'dialog/fck_syntaxhighlight.html', 500, 500));
42

    
43
// Create the "SyntaxHighLight" toolbar button.
44
var oSyntaxhighlightItem = new FCKToolbarButton('SyntaxHighLight2', FCKLang.SyntaxhighlightBtn);
45
oSyntaxhighlightItem.IconPath = FCKPlugins.Items['syntaxhighlight2'].Path + 'images/syntaxhighlight.gif';
46

    
47
FCKToolbarItems.RegisterItem('SyntaxHighLight2', oSyntaxhighlightItem);
48

    
49

    
(2-2/3)