1 |
|
tiny
MCE
.
i
m
p
ortP
lugin
La
n
g
u
a
g
eP
a
c
k
(
'
print
'
);
v
a
r
T
in
yMCE_P
rint
P
lug
in
={
getInfo:fu
nction(){r
eturn{long
name:'Prin
t',author:
'Moxiecode
Systems
AB',author
url:'http:
//tinymce.
moxiecode.
com',infou
rl:'http:/
/wiki.moxi
ecode.com/
index.php/
TinyMCE:Pl
ugins/prin
t',version
:tiny
MCE
.majorVers
ion+"."+ti
ny
MCE
.minorVers
ion}
}
,getContro
lHTML:func
tion(cn){s
witch(cn
)
{case"prin
t":return
tiny
MCE.getBut
tonHTML(
c
n,'lang_pr
int_d
e
sc','{$p
lugin
url}/im
a
ges/pri
n
t.
g
if','mc
e
P
r
int')}retu
rn""},exec
Comm
a
n
d
:function(
e
d
ito
r
_
i
d,eleme
nt
,
command,us
er_in
t
erface,val
ue){sw
i
tch(comma
n
d){case"
mce
Print":tin
yMCE
.
g
etInstance
ById(ed
i
tor_id).co
n
tentWindow
.
p
rint
(
);
return
true
}
return
false}};ti
nyMCE.addP
lugin
(
"print",Ti
nyMCE_Prin
tPlugin
);
|
|
1 |
|
(function(
){
tiny
mce
.
create('t
i
ny
m
ce.
p
lugin
s.Pri
n
t',{init:f
u
nction(ed,
url){ed.
a
ddCommand(
'mc
eP
rint',fun
c
tion
(
){ed.getWi
n().
print
(
);
});ed.
a
ddButton('
p
r
in
t',{title:
'p
rint
.print_des
c',cmd:'mc
e
P
r
in
t'});},
getInfo:fu
nction(){r
eturn{long
name:'Prin
t',author:
'Moxiecode
Systems
AB',author
url:'http:
//tinymce.
moxiecode.
com',infou
rl:'http:/
/wiki.moxi
ecode.com/
index.php/
TinyMCE:Pl
ugins/prin
t',version
:tiny
mce
.majorVers
ion+"."+ti
ny
mce
.minorVers
ion}
;}
}
)
;
tiny
m
c
e
.P
lugin
M
a
n
a
g
e
r
.
a
d
d
('p
r
i
nt
'
,
t
i
n
y
mce
.
plu
g
i
n
s
.
P
rint
);
}
)
(
);
|