No regular expressions were active.
1 |
|
/**
|
|
|
2 |
|
* $Id: ed
itor_plugi
n_src.js 2
01 2007-02
-12 15:56:
56Z spocke
$
|
|
|
3 |
|
*
|
|
|
4 |
|
* @author
Moxiecode
|
|
|
5 |
|
* @copyri
ght Copyri
ght © 2004
-2007, Mox
iecode Sys
tems AB, A
ll rights
reserved.
|
|
|
6 |
|
*/
|
|
|
7 |
|
|
|
|
8 |
|
var TinyMC
E_ZoomPlug
in = {
|
|
|
9 |
|
getInf
o : functi
on() {
|
|
|
10 |
|
re
turn {
|
|
|
11 |
|
longname
: 'Zoom',
|
|
|
12 |
|
author :
'Moxiecod
e Systems
AB',
|
|
|
13 |
|
authorur
l : 'http:
//tinymce.
moxiecode.
com',
|
|
|
14 |
|
infourl
: 'http://
wiki.moxie
code.com/i
ndex.php/T
inyMCE:Plu
gins/zoom'
,
|
|
|
15 |
|
version
: tinyMCE.
majorVersi
on + "." +
tinyMCE.m
inorVersio
n
|
|
|
16 |
|
};
|
|
|
17 |
|
},
|
|
|
18 |
|
|
|
|
19 |
|
/**
|
|
|
20 |
|
* Ret
urns the H
TML conten
ts of the
zoom contr
ol.
|
|
|
21 |
|
*/
|
|
|
22 |
|
getCon
trolHTML :
function(
control_na
me) {
|
|
|
23 |
|
if
(!tinyMCE
.isMSIE ||
tinyMCE.i
sMSIE5_0 |
| tinyMCE.
isOpera)
|
|
|
24 |
|
return "
";
|
|
|
25 |
|
|
|
|
26 |
|
sw
itch (cont
rol_name)
{
|
|
|
27 |
|
case "zo
om":
|
|
|
28 |
|
retu
rn '<selec
t id="{$ed
itor_id}_z
oomSelect"
name="{$e
ditor_id}_
zoomSelect
" onfocus=
"tinyMCE.a
ddSelectAc
cessibilit
y(event, t
his, windo
w);" oncha
nge="tinyM
CE.execIns
tanceComma
nd(\'{$edi
tor_id}\',
\'mceZoom\
',false,th
is.options
[this.sele
ctedIndex]
.value);"
class="mce
SelectList
">' +
|
|
|
29 |
|
'<opti
on value="
100%">+ 10
0%</option
>' +
|
|
|
30 |
|
'<opti
on value="
150%">+ 15
0%</option
>' +
|
|
|
31 |
|
'<opti
on value="
200%">+ 20
0%</option
>' +
|
|
|
32 |
|
'<opti
on value="
250%">+ 25
0%</option
>' +
|
|
|
33 |
|
'</sel
ect>';
|
|
|
34 |
|
}
|
|
|
35 |
|
|
|
|
36 |
|
re
turn "";
|
|
|
37 |
|
},
|
|
|
38 |
|
|
|
|
39 |
|
/**
|
|
|
40 |
|
* Exe
cutes the
mceZoom co
mmand.
|
|
|
41 |
|
*/
|
|
|
42 |
|
execCo
mmand : fu
nction(edi
tor_id, el
ement, com
mand, user
_interface
, value) {
|
|
|
43 |
|
//
Handle co
mmands
|
|
|
44 |
|
sw
itch (comm
and) {
|
|
|
45 |
|
case "mc
eZoom":
|
|
|
46 |
|
tiny
MCE.getIns
tanceById(
editor_id)
.contentDo
cument.bod
y.style.zo
om = value
;
|
|
|
47 |
|
tiny
MCE.getIns
tanceById(
editor_id)
.contentDo
cument.bod
y.style.mo
zZoom = va
lue;
|
|
|
48 |
|
retu
rn true;
|
|
|
49 |
|
}
|
|
|
50 |
|
|
|
|
51 |
|
//
Pass to n
ext handle
r in chain
|
|
|
52 |
|
re
turn false
;
|
|
|
53 |
|
}
|
|
|
54 |
|
};
|
|
|
55 |
|
|
|
|
56 |
|
tinyMCE.ad
dPlugin("z
oom", Tiny
MCE_ZoomPl
ugin);
|
|
|