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
plugin spe
cific lang
uage pack
*/
|
|
8 |
|
(function(
) {
|
9 |
|
tinyMCE.im
portPlugin
LanguagePa
ck('iespel
l');
|
|
9 |
|
tinymc
e.create('
tinymce.pl
ugins.IESp
ell', {
|
|
|
10 |
|
in
it : funct
ion(ed, ur
l) {
|
|
|
11 |
|
var t =
this, sp;
|
10 |
|
|
|
12 |
|
|
11 |
|
var TinyMC
E_IESpellP
lugin = {
|
|
13 |
|
if (!tin
ymce.isIE)
|
12 |
|
getInf
o : functi
on() {
|
|
14 |
|
return
;
|
13 |
|
re
turn {
|
|
|
14 |
|
longname
: 'IESpel
l (MSIE On
ly)',
|
|
|
15 |
|
author :
'Moxiecod
e Systems
AB',
|
|
|
16 |
|
authorur
l : 'http:
//tinymce.
moxiecode.
com',
|
|
|
17 |
|
infourl
: 'http://
wiki.moxie
code.com/i
ndex.php/T
inyMCE:Plu
gins/iespe
ll',
|
|
|
18 |
|
version
: tinyMCE.
majorVersi
on + "." +
tinyMCE.m
inorVersio
n
|
|
|
19 |
|
}
;
|
|
|
20 |
|
},
|
|
|
21 |
|
|
|
15 |
|
|
22 |
|
/**
|
|
16 |
|
t.editor
= ed;
|
23 |
|
* Ret
urns the H
TML conten
ts of the
iespell co
ntrol.
|
|
|
24 |
|
*/
|
|
|
25 |
|
getCon
trolHTML :
function(
cn) {
|
|
|
26 |
|
//
Is it the
iespell c
ontrol and
is the br
ower MSIE.
|
|
|
27 |
|
if
(cn == "i
espell" &&
(tinyMCE.
isMSIE &&
!tinyMCE.i
sOpera))
|
|
|
28 |
|
return t
inyMCE.get
ButtonHTML
(cn, 'lang
_iespell_d
esc', '{$p
luginurl}/
images/ies
pell.gif',
'mceIESpe
ll');
|
|
|
29 |
|
|
|
|
30 |
|
re
turn "";
|
|
|
31 |
|
},
|
|
|
32 |
|
|
|
17 |
|
|
33 |
|
/**
|
|
18 |
|
//
R
e
g
i
st
e
r
c
ommand
s
|
34 |
|
* Exe
cutes the
mceIESpell
command.
|
|
19 |
|
ed.addC
ommand
('
mceIESpell
',
function(
)
{
|
35 |
|
*/
|
|
|
36 |
|
execCo
mmand : fu
nction(edi
tor_id, el
ement, com
mand, user
_interface
, value) {
|
|
|
37 |
|
//
Handl
e
i
e
SpellC
ommand
|
|
|
38 |
|
if
(c
ommand
==
"
mceIESpell
"
)
{
|
|
|
39 |
|
try {
|
|
20 |
|
try
{
|
40 |
|
var
ieS
p
ell
=
new
ActiveXObj
ect("ieSpe
ll.ieSpell
Extension"
);
|
|
21 |
|
s
p
=
new
ActiveXObj
ect("ieSpe
ll.ieSpell
Extension"
);
|
41 |
|
ieS
p
ell
.CheckDocu
mentNode(
tinyMCE.ge
tInstanceB
yId(
ed
itor_id)
.
cont
e
n
tDoc
ument
.documentE
lement);
|
|
22 |
|
s
p
.CheckDocu
mentNode(
ed
.
g
e
tDoc
()
.documentE
lement);
|
42 |
|
} catch
(e) {
|
|
23 |
|
} ca
tch (e) {
|
43 |
|
if (
e.number =
= -2146827
859) {
|
|
24 |
|
if (e.numb
er == -214
6827859) {
|
44 |
|
i
f
(
confirm(
tinyMCE
.getLang("
lang_
iespell
_
download"
,
"",
tr
u
e))
)
|
|
25 |
|
ed.w
i
ndowManage
r.
confirm(
ed
.getLang("
iespell
.
download"
)
,
f
u
nction(s
)
{
|
|
|
26 |
|
if
(s)
|
45 |
|
window
.open('htt
p://www.ie
spell.com/
download.p
hp', 'ieSp
ellDownloa
d', '');
|
|
27 |
|
window.o
pen('http:
//www.iesp
ell.com/do
wnload.php
', 'ieSpel
lDownload'
, '');
|
|
|
28 |
|
});
|
46 |
|
} el
se
|
|
29 |
|
} else
|
47 |
|
alert("Err
or
Loading
ieSpell:
Exception
"
+
e.number);
|
|
30 |
|
ed.windowM
anager.
alert("Err
or
Loading
ieSpell:
Exception
"
+
e.number);
|
48 |
|
}
|
|
31 |
|
}
|
|
|
32 |
|
});
|
49 |
|
|
|
33 |
|
|
50 |
|
return t
rue;
|
|
34 |
|
// Regis
ter button
s
|
51 |
|
}
|
|
35 |
|
ed.addBu
tton('iesp
ell', {tit
le : 'iesp
ell.iespel
l_desc', c
md : 'mceI
ESpell'});
|
|
|
36 |
|
}
,
|
52 |
|
|
|
37 |
|
|
53 |
|
//
Pass to n
ext handle
r in chain
|
|
38 |
|
ge
tInfo : fu
nction() {
|
54 |
|
return
false;
|
|
39 |
|
return
{
|
55 |
|
}
|
|
40 |
|
long
name : 'IE
Spell (IE
Only)',
|
|
|
41 |
|
auth
or : 'Moxi
ecode Syst
ems AB',
|
|
|
42 |
|
auth
orurl : 'h
ttp://tiny
mce.moxiec
ode.com',
|
|
|
43 |
|
info
url : 'htt
p://wiki.m
oxiecode.c
om/index.p
hp/TinyMCE
:Plugins/i
espell',
|
|
|
44 |
|
vers
ion : tiny
mce.majorV
ersion + "
." + tinym
ce.minorVe
rsion
|
56 |
|
};
|
|
45 |
|
};
|
|
|
46 |
|
}
|
|
|
47 |
|
});
|
57 |
|
|
|
48 |
|
|
58 |
|
tiny
MCE
.
add
Plugin
(
"
iespell
"
,
T
iny
MCE_
IESpell
Plugin
);
|
|
49 |
|
// Reg
ister plug
in
|
|
|
50 |
|
tiny
mce
.
Plugin
Manager.ad
d
(
'
iespell
'
,
t
iny
mce.plugin
s.
IESpell
);
|
|
|
51 |
|
})();
|