No regular expressions were active.
1 |
|
/**
|
|
1 |
|
/**
|
2 |
|
*
$Id:
editor_plu
gin_src.js
20
1
200
7
-0
2-
1
2
1
5:5
6:
56
Z
spocke
$
|
|
2 |
|
*
$Id:
editor_plu
gin_src.js
5
20
200
8
-0
1
-07
1
6:
30:32
Z
spocke
$
|
3 |
|
*
|
|
3 |
|
*
|
4 |
|
* @author
Moxiecode
|
|
4 |
|
* @author
Moxiecode
|
5 |
|
*
@copyright
Copyright
©
2004-200
7
,
Moxiecode
Systems
AB,
All
rights
reserved.
|
|
5 |
|
*
@copyright
Copyright
©
2004-200
8
,
Moxiecode
Systems
AB,
All
rights
reserved.
|
6 |
|
*/
|
|
6 |
|
*/
|
7 |
|
|
|
7 |
|
|
8 |
|
/* Import
theme spec
ific langu
age pack *
/
|
|
8 |
|
(function(
) {
|
9 |
|
tinyMCE.im
portPlugin
LanguagePa
ck('print'
);
|
|
9 |
|
tinymc
e.create('
tinymce.pl
ugins.Prin
t', {
|
|
|
10 |
|
in
it : funct
ion(ed, ur
l) {
|
|
|
11 |
|
ed.addCo
mmand('mce
Print', fu
nction() {
|
|
|
12 |
|
ed.g
etWin().pr
int();
|
|
|
13 |
|
});
|
|
|
14 |
|
|
|
|
15 |
|
ed.addBu
tton('prin
t', {title
: 'print.
print_desc
', cmd : '
mcePrint'}
);
|
|
|
16 |
|
},
|
10 |
|
|
|
17 |
|
|
11 |
|
var TinyMC
E_PrintPlu
gin = {
|
|
|
12 |
|
getInf
o : functi
on() {
|
|
18 |
|
ge
tInfo : fu
nction() {
|
13 |
|
re
turn {
|
|
19 |
|
return {
|
14 |
|
longname
: 'Print'
,
|
|
20 |
|
long
name : 'Pr
int',
|
15 |
|
author :
'Moxiecod
e Systems
AB',
|
|
21 |
|
auth
or : 'Moxi
ecode Syst
ems AB',
|
16 |
|
authorur
l : 'http:
//tinymce.
moxiecode.
com',
|
|
22 |
|
auth
orurl : 'h
ttp://tiny
mce.moxiec
ode.com',
|
17 |
|
infourl
: 'http://
wiki.moxie
code.com/i
ndex.php/T
inyMCE:Plu
gins/print
',
|
|
23 |
|
info
url : 'htt
p://wiki.m
oxiecode.c
om/index.p
hp/TinyMCE
:Plugins/p
rint',
|
18 |
|
version
:
tiny
MCE
.majorVers
ion
+
"."
+
tiny
MCE
.minorVers
ion
|
|
24 |
|
version
:
tiny
mce
.majorVers
ion
+
"."
+
tiny
mce
.minorVers
ion
|
19 |
|
};
|
|
25 |
|
};
|
20 |
|
},
|
|
|
21 |
|
|
|
|
22 |
|
getCon
trolHTML :
function(
cn) {
|
|
|
23 |
|
sw
itch (cn)
{
|
|
|
24 |
|
case "pr
int":
|
|
|
25 |
|
retu
rn tinyMCE
.getButton
HTML(cn, '
lang_print
_desc', '{
$pluginurl
}/images/p
rint.gif',
'mcePrint
');
|
|
|
26 |
|
}
|
|
26 |
|
}
|
|
|
27 |
|
});
|
27 |
|
|
|
28 |
|
|
28 |
|
re
turn "";
|
|
29 |
|
// Reg
ister plug
in
|
29 |
|
},
|
|
30 |
|
tiny
mce
.
Plugin
Manager.ad
d
(
'
print
'
,
t
iny
mce.p
lugin
s.Print
);
|
30 |
|
|
|
31 |
|
})();
|
31 |
|
/**
|
|
|
32 |
|
* Exe
cutes the
search/rep
lace comma
nds.
|
|
|
33 |
|
*/
|
|
|
34 |
|
execCo
mmand : fu
nction(edi
tor_id, el
ement, com
mand, user
_interface
, value) {
|
|
|
35 |
|
//
Handle co
mmands
|
|
|
36 |
|
sw
itch (comm
and) {
|
|
|
37 |
|
case "mc
ePrint":
|
|
|
38 |
|
tiny
MCE.getIns
tanceById(
editor_id)
.contentWi
ndow.print
();
|
|
|
39 |
|
retu
rn true;
|
|
|
40 |
|
}
|
|
|
41 |
|
|
|
|
42 |
|
//
Pass to n
ext handle
r in chain
|
|
|
43 |
|
re
turn false
;
|
|
|
44 |
|
}
|
|
|
45 |
|
};
|
|
|
46 |
|
|
|
|
47 |
|
tiny
MCE
.
add
Plugin
(
"
print
"
,
T
iny
MCE_PrintP
lugin
);
|
|
|