No regular expressions were active.
1 |
|
var devkit
= parent.
tinyMCE.pl
ugins['dev
kit'], log
Enabled =
true, flip
= false,
book = nul
l;
|
|
|
2 |
|
|
|
|
3 |
|
function i
nit() {
|
|
|
4 |
|
var lo
g, i, f =
document.f
orms[0];
|
|
|
5 |
|
|
|
|
6 |
|
devkit
._winLoade
d = true;
|
|
|
7 |
|
|
|
|
8 |
|
log =
tinyMCE.lo
g;
|
|
|
9 |
|
|
|
|
10 |
|
for (i
=0; i<log.
length; i+
+)
|
|
|
11 |
|
de
bug(log[i]
);
|
|
|
12 |
|
|
|
|
13 |
|
f.logf
ilter.valu
e = devkit
._logFilte
r;
|
|
|
14 |
|
}
|
|
|
15 |
|
|
|
|
16 |
|
function c
hangeFilte
r(f) {
|
|
|
17 |
|
devkit
._logFilte
r = f;
|
|
|
18 |
|
}
|
|
|
19 |
|
|
|
|
20 |
|
function t
oggleLog(s
) {
|
|
|
21 |
|
logEna
bled = s;
|
|
|
22 |
|
}
|
|
|
23 |
|
|
|
|
24 |
|
function t
oggleFlip(
) {
|
|
|
25 |
|
docume
nt.getElem
entById('f
lipbtn').s
rc = flip
? 'images/
flip_down.
gif' : 'im
ages/flip_
up.gif';
|
|
|
26 |
|
|
|
|
27 |
|
if (fl
ip)
|
|
|
28 |
|
pa
rent.docum
ent.getEle
mentById('
devkit').c
lassName =
'devkitup
';
|
|
|
29 |
|
else
|
|
|
30 |
|
pa
rent.docum
ent.getEle
mentById('
devkit').c
lassName =
'devkitdo
wn';
|
|
|
31 |
|
|
|
|
32 |
|
flip =
!flip;
|
|
|
33 |
|
}
|
|
|
34 |
|
|
|
|
35 |
|
function d
ebug(s) {
|
|
|
36 |
|
var d,
l, n;
|
|
|
37 |
|
|
|
|
38 |
|
if (!l
ogEnabled
|| !new Re
gExp(devki
t._logFilt
er, 'gi').
test(s))
|
|
|
39 |
|
re
turn;
|
|
|
40 |
|
|
|
|
41 |
|
d = do
cument;
|
|
|
42 |
|
l = d.
getElement
ById('log'
);
|
|
|
43 |
|
n = d.
createElem
ent('span'
);
|
|
|
44 |
|
|
|
|
45 |
|
n.inne
rHTML = ti
nyMCE.xmlE
ncode(s);
|
|
|
46 |
|
|
|
|
47 |
|
l.appe
ndChild(n)
;
|
|
|
48 |
|
l.scro
llTop = l.
scrollHeig
ht;
|
|
|
49 |
|
}
|
|
|
50 |
|
|
|
|
51 |
|
function r
enderInfo(
) {
|
|
|
52 |
|
var se
= documen
t.getEleme
ntById('in
fo'), n, s
n, inst, h
= '', sel
, rng, ins
tCount = 0
, rc;
|
|
|
53 |
|
|
|
|
54 |
|
h += '
<h2>Browse
r info:</h
2>';
|
|
|
55 |
|
|
|
|
56 |
|
h += '
<table bor
der="0" ce
llpadding=
"0" cellsp
acing="0"
class="dat
a">';
|
|
|
57 |
|
h += a
ddRenderIn
fo('naviga
tor.userAg
ent', navi
gator.user
Agent);
|
|
|
58 |
|
h += a
ddRenderIn
fo('naviga
tor.appNam
e', naviga
tor.appNam
e);
|
|
|
59 |
|
h += a
ddRenderIn
fo('naviga
tor.platfo
rm', navig
ator.platf
orm);
|
|
|
60 |
|
h += a
ddRenderIn
fo('naviga
tor.langua
ge', navig
ator.langu
age, 'bspe
c');
|
|
|
61 |
|
h += a
ddRenderIn
fo('naviga
tor.browse
rLanguage'
, navigato
r.browserL
anguage, '
bspec');
|
|
|
62 |
|
h += a
ddRenderIn
fo('naviga
tor.system
Language',
navigator
.systemLan
guage, 'bs
pec');
|
|
|
63 |
|
h += a
ddRenderIn
fo('naviga
tor.userLa
nguage', n
avigator.u
serLanguag
e, 'bspec'
);
|
|
|
64 |
|
h += a
ddRenderIn
fo('opera.
buildNumbe
r("inconsp
icuous")',
typeof(op
era) != 'u
ndefined'
&& opera.b
uildNumber
? opera.b
uildNumber
('inconspi
cuous') :
null, 'bsp
ec');
|
|
|
65 |
|
h += a
ddRenderIn
fo('window
.innerWidt
h', parent
.window.in
nerWidth,
'bspec');
|
|
|
66 |
|
h += a
ddRenderIn
fo('window
.innerHeig
ht', paren
t.window.i
nnerHeight
, 'bspec')
;
|
|
|
67 |
|
h += a
ddRenderIn
fo('docume
nt.body.of
fsetWidth'
, parent.d
ocument.bo
dy.offsetW
idth);
|
|
|
68 |
|
h += a
ddRenderIn
fo('docume
nt.body.of
fsetHeight
', parent.
document.b
ody.offset
Height);
|
|
|
69 |
|
h += a
ddRenderIn
fo('screen
.width', s
creen.widt
h);
|
|
|
70 |
|
h += a
ddRenderIn
fo('screen
.height',
screen.hei
ght);
|
|
|
71 |
|
h += a
ddRenderIn
fo('screen
.availWidt
h', screen
.availWidt
h);
|
|
|
72 |
|
h += a
ddRenderIn
fo('screen
.availHeig
ht', scree
n.availHei
ght);
|
|
|
73 |
|
h += a
ddRenderIn
fo('screen
.colorDept
h', screen
.colorDept
h);
|
|
|
74 |
|
h += a
ddRenderIn
fo('screen
.pixelDept
h', screen
.pixelDept
h, 'bspec'
);
|
|
|
75 |
|
h += a
ddRenderIn
fo('docume
nt.content
Type', doc
ument.cont
entType, '
bspec');
|
|
|
76 |
|
h += '
</table>';
|
|
|
77 |
|
|
|
|
78 |
|
h += '
<h2>TinyMC
E_Engine i
nfo:</h2>'
;
|
|
|
79 |
|
|
|
|
80 |
|
h += '
<table bor
der="0" ce
llpadding=
"0" cellsp
acing="0"
class="dat
a">';
|
|
|
81 |
|
h += a
ddRenderIn
fo('baseUR
L', tinyMC
E.baseURL)
;
|
|
|
82 |
|
h += a
ddRenderIn
fo('select
edInstance
.editorId'
, tinyMCE.
selectedIn
stance ? t
inyMCE.sel
ectedInsta
nce.editor
Id : null)
;
|
|
|
83 |
|
h += a
ddRenderIn
fo('select
edElement.
nodeName',
tinyMCE.s
electedEle
ment ? tin
yMCE.selec
tedElement
.nodeName
: null, 'd
ep');
|
|
|
84 |
|
h += a
ddRenderIn
fo('loaded
Files',tin
yMCE.loade
dFiles.joi
n(','));
|
|
|
85 |
|
h += a
ddRenderIn
fo('isMSIE
', tinyMCE
.isMSIE);
|
|
|
86 |
|
h += a
ddRenderIn
fo('isMSIE
5', tinyMC
E.isMSIE5)
;
|
|
|
87 |
|
h += a
ddRenderIn
fo('isMSIE
5_0', tiny
MCE.isMSIE
5_0);
|
|
|
88 |
|
h += a
ddRenderIn
fo('isMSIE
7', tinyMC
E.isMSIE7)
;
|
|
|
89 |
|
h += a
ddRenderIn
fo('isGeck
o', tinyMC
E.isGecko)
;
|
|
|
90 |
|
h += a
ddRenderIn
fo('isSafa
ri', tinyM
CE.isSafar
i);
|
|
|
91 |
|
h += a
ddRenderIn
fo('isOper
a', tinyMC
E.isOpera)
;
|
|
|
92 |
|
h += a
ddRenderIn
fo('isMac'
, tinyMCE.
isMac);
|
|
|
93 |
|
h += a
ddRenderIn
fo('isNS7'
, tinyMCE.
isNS7);
|
|
|
94 |
|
h += a
ddRenderIn
fo('isNS71
', tinyMCE
.isNS71);
|
|
|
95 |
|
h += a
ddRenderIn
fo('idCoun
ter', tiny
MCE.idCoun
ter);
|
|
|
96 |
|
h += a
ddRenderIn
fo('curren
tConfig',
tinyMCE.cu
rrentConfi
g);
|
|
|
97 |
|
h += a
ddRenderIn
fo('majorV
ersion', t
inyMCE.maj
orVersion)
;
|
|
|
98 |
|
h += a
ddRenderIn
fo('minorV
ersion', t
inyMCE.min
orVersion)
;
|
|
|
99 |
|
h += a
ddRenderIn
fo('releas
eDate', ti
nyMCE.rele
aseDate);
|
|
|
100 |
|
h += a
ddRenderIn
fo('docume
ntBasePath
', tinyMCE
.documentB
asePath);
|
|
|
101 |
|
h += a
ddRenderIn
fo('docume
ntURL', ti
nyMCE.docu
mentURL);
|
|
|
102 |
|
h += '
</table>';
|
|
|
103 |
|
|
|
|
104 |
|
for (n
in tinyMC
E.instance
s) {
|
|
|
105 |
|
in
st = tinyM
CE.instanc
es[n];
|
|
|
106 |
|
|
|
|
107 |
|
if
(!tinyMCE
.isInstanc
e(inst))
|
|
|
108 |
|
continue
;
|
|
|
109 |
|
|
|
|
110 |
|
se
l = inst.s
election.g
etSel();
|
|
|
111 |
|
rn
g = inst.s
election.g
etRng();
|
|
|
112 |
|
|
|
|
113 |
|
h
+= '<h2>Ti
nyMCE_Cont
rol(' + (i
nstCount++
) + ') id:
' + inst.
editorId +
'</h2>';
|
|
|
114 |
|
h
+= '<table
border="0
" cellpadd
ing="0" ce
llspacing=
"0" class=
"data">';
|
|
|
115 |
|
|
|
|
116 |
|
h
+= addRend
erInfo('ed
itorId', i
nst.editor
Id);
|
|
|
117 |
|
h
+= addRend
erInfo('vi
sualAid',
inst.visua
lAid);
|
|
|
118 |
|
h
+= addRend
erInfo('fo
reColor',
inst.foreC
olor);
|
|
|
119 |
|
h
+= addRend
erInfo('ba
ckColor',
inst.backC
olor);
|
|
|
120 |
|
h
+= addRend
erInfo('fo
rmTargetEl
ementId',
inst.formT
argetEleme
ntId);
|
|
|
121 |
|
h
+= addRend
erInfo('fo
rmElement'
, inst.for
mElement ?
inst.form
Element.no
deName : n
ull);
|
|
|
122 |
|
h
+= addRend
erInfo('ol
dTargetEle
ment', ins
t.oldTarge
tElement ?
inst.oldT
argetEleme
nt.nodeNam
e : null);
|
|
|
123 |
|
h
+= addRend
erInfo('li
nkElement'
, inst.lin
kElement ?
inst.link
Element.no
deName : n
ull, 'dep'
);
|
|
|
124 |
|
h
+= addRend
erInfo('im
gElement',
inst.imgE
lement ? i
nst.imgEle
ment.nodeN
ame : null
, 'dep');
|
|
|
125 |
|
h
+= addRend
erInfo('se
lectedNode
', inst.se
lectedNode
? inst.se
lectedNode
.nodeName
: null, 'd
ep');
|
|
|
126 |
|
h
+= addRend
erInfo('ta
rgetElemen
t', inst.t
argetEleme
nt ? inst.
targetElem
ent.nodeNa
me : null)
;
|
|
|
127 |
|
h
+= addRend
erInfo('ge
tBody().no
deName', i
nst.getBod
y() ? inst
.getBody()
.nodeName
: null);
|
|
|
128 |
|
h
+= addRend
erInfo('ge
tBody().ge
tAttribute
("id")', i
nst.getBod
y() ? inst
.getBody()
.getAttrib
ute("id")
: null);
|
|
|
129 |
|
h
+= addRend
erInfo('ge
tDoc().loc
ation', in
st.getDoc(
) ? inst.g
etDoc().lo
cation : n
ull);
|
|
|
130 |
|
h
+= addRend
erInfo('st
artContent
', inst.st
artContent
);
|
|
|
131 |
|
h
+= addRend
erInfo('is
Hidden()',
inst.isHi
dden());
|
|
|
132 |
|
h
+= addRend
erInfo('is
Dirty()',
inst.isDir
ty());
|
|
|
133 |
|
h
+= addRend
erInfo('un
doRedo.und
oLevels.le
ngth', ins
t.undoRedo
.undoLevel
s.length);
|
|
|
134 |
|
h
+= addRend
erInfo('un
doRedo.und
oIndex', i
nst.undoRe
do.undoInd
ex);
|
|
|
135 |
|
h
+= addRend
erInfo('se
lection.ge
tSelectedH
TML()', in
st.selecti
on.getSele
ctedHTML()
);
|
|
|
136 |
|
h
+= addRend
erInfo('se
lection.is
Collapsed(
)', inst.s
election.i
sCollapsed
() || 'fal
se');
|
|
|
137 |
|
h
+= addRend
erInfo('se
lection.ge
tSelectedT
ext()', in
st.selecti
on.getSele
ctedText()
);
|
|
|
138 |
|
h
+= addRend
erInfo('se
lection.ge
tFocusElem
ent().node
Name', ins
t.selectio
n.getFocus
Element().
nodeName);
|
|
|
139 |
|
h
+= addRend
erInfo('se
lection.ge
tFocusElem
ent().oute
rHTML', ti
nyMCE.getO
uterHTML(i
nst.select
ion.getFoc
usElement(
)));
|
|
|
140 |
|
|
|
|
141 |
|
if
((tinyMCE
.isGecko |
| tinyMCE.
isOpera) &
& sel && r
ng) {
|
|
|
142 |
|
h += add
RenderInfo
('selectio
n.getSel()
.anchorNod
e.nodeName
', sel.anc
horNode ?
sel.anchor
Node.nodeN
ame : null
, 'bspec')
;
|
|
|
143 |
|
h += add
RenderInfo
('selectio
n.getSel()
.anchorOff
set', sel.
anchorOffs
et, 'bspec
');
|
|
|
144 |
|
h += add
RenderInfo
('selectio
n.getSel()
.focusNode
.nodeName'
, sel.focu
sNode ? se
l.focusNod
e.nodeName
: null, '
bspec');
|
|
|
145 |
|
h += add
RenderInfo
('selectio
n.getSel()
.focusOffs
et', sel.f
ocusOffset
, 'bspec')
;
|
|
|
146 |
|
h += add
RenderInfo
('selectio
n.getRng()
.startCont
ainer.node
Name', rng
.startCont
ainer ? rn
g.startCon
tainer.nod
eName : nu
ll, 'bspec
');
|
|
|
147 |
|
h += add
RenderInfo
('selectio
n.getRng()
.startOffs
et', rng.s
tartOffset
, 'bspec')
;
|
|
|
148 |
|
h += add
RenderInfo
('selectio
n.getRng()
.endContai
ner.nodeNa
me', rng.e
ndContaine
r ? rng.en
dContainer
.nodeName
: null, 'b
spec');
|
|
|
149 |
|
h += add
RenderInfo
('selectio
n.getRng()
.endOffset
', rng.end
Offset, 'b
spec');
|
|
|
150 |
|
}
|
|
|
151 |
|
|
|
|
152 |
|
if
(typeof(r
ng.item) !
= 'undefin
ed' || typ
eof(rng.ht
mlText) !=
'undefine
d') {
|
|
|
153 |
|
if (!rng
.item) {
|
|
|
154 |
|
h +=
addRender
Info('sele
ction.getS
el().type'
, sel.type
, 'bspec')
;
|
|
|
155 |
|
h +=
addRender
Info('sele
ction.getR
ng().htmlT
ext', rng.
htmlText,
'bspec');
|
|
|
156 |
|
h +=
addRender
Info('sele
ction.getR
ng().text'
, rng.text
, 'bspec')
;
|
|
|
157 |
|
} else
|
|
|
158 |
|
h +=
addRender
Info('sele
ction.getR
ng().item(
0).nodeNam
e', rng.it
em(0).node
Name, 'bsp
ec');
|
|
|
159 |
|
}
|
|
|
160 |
|
|
|
|
161 |
|
h
+= '</tabl
e>';
|
|
|
162 |
|
}
|
|
|
163 |
|
|
|
|
164 |
|
h += '
<p>Fields
marked in
<strong cl
ass="bspec
">gray</st
rong> is n
ot cross b
rowser and
should be
used with
care.</p>
';
|
|
|
165 |
|
h += '
<p>Fields
marked <st
rong class
="dep">red
</strong>
are marked
deprecate
d and will
be remove
d in the f
uture.</p>
<br />';
|
|
|
166 |
|
|
|
|
167 |
|
se.inn
erHTML = h
;
|
|
|
168 |
|
}
|
|
|
169 |
|
|
|
|
170 |
|
function a
ddRenderIn
fo(n, v, c
) {
|
|
|
171 |
|
return
'<tr><td'
+ (c ? '
class="' +
c + '"' :
'')+ '>'
+ n + '</t
d><td><inp
ut type="t
ext" value
="' + tiny
MCE.xmlEnc
ode(v != n
ull ? (''
+ v).repla
ce(/[\r\n]
/g, '') :
'null') +
'" /></td>
</tr>';
|
|
|
172 |
|
}
|
|
|
173 |
|
|
|
|
174 |
|
function r
enderSetti
ngs() {
|
|
|
175 |
|
var se
= documen
t.getEleme
ntById('se
ttings'),
n, sn, ins
t, h = '',
v;
|
|
|
176 |
|
|
|
|
177 |
|
for (n
in tinyMC
E.instance
s) {
|
|
|
178 |
|
in
st = tinyM
CE.instanc
es[n];
|
|
|
179 |
|
|
|
|
180 |
|
if
(!tinyMCE
.isInstanc
e(inst))
|
|
|
181 |
|
continue
;
|
|
|
182 |
|
|
|
|
183 |
|
h
+= '<h2>In
stance id:
' + inst.
editorId +
'</h2>';
|
|
|
184 |
|
h
+= '<table
border="0
" cellpadd
ing="0" ce
llspacing=
"0" class=
"data">';
|
|
|
185 |
|
|
|
|
186 |
|
fo
r (sn in i
nst.settin
gs) {
|
|
|
187 |
|
v = inst
.settings[
sn];
|
|
|
188 |
|
|
|
|
189 |
|
h += '<t
r><td clas
s="col1">'
+ tinyMCE
.xmlEncode
(sn) + '</
td><td><in
put type="
text" valu
e="' + tin
yMCE.xmlEn
code(v) +
'" /></td>
</tr>';
|
|
|
190 |
|
}
|
|
|
191 |
|
|
|
|
192 |
|
h
+= '</tabl
e>';
|
|
|
193 |
|
}
|
|
|
194 |
|
|
|
|
195 |
|
se.inn
erHTML = h
;
|
|
|
196 |
|
}
|
|
|
197 |
|
|
|
|
198 |
|
function r
enderConte
nt() {
|
|
|
199 |
|
var se
= documen
t.getEleme
ntById('co
ntent'), n
, inst, h
= '';
|
|
|
200 |
|
|
|
|
201 |
|
for (n
in tinyMC
E.instance
s) {
|
|
|
202 |
|
in
st = tinyM
CE.instanc
es[n];
|
|
|
203 |
|
|
|
|
204 |
|
if
(!tinyMCE
.isInstanc
e(inst))
|
|
|
205 |
|
continue
;
|
|
|
206 |
|
|
|
|
207 |
|
h
+= '<h2>In
stance id:
' + inst.
editorId +
'</h2>';
|
|
|
208 |
|
|
|
|
209 |
|
h
+= '<h3>St
art conten
t - inst.s
tartConten
t:</h3>';
|
|
|
210 |
|
h
+= '<div>'
+ tinyMCE
.xmlEncode
(inst.star
tContent)
+ '</div>'
;
|
|
|
211 |
|
|
|
|
212 |
|
h
+= '<h3>Ra
w content
- inst.get
Body().inn
erHTML or
inst.getHT
ML(true):<
/h3>';
|
|
|
213 |
|
h
+= '<div>'
+ tinyMCE
.xmlEncode
(inst.getH
TML(true))
+ '</div>
';
|
|
|
214 |
|
|
|
|
215 |
|
h
+= '<h3>Cl
eaned cont
ent - inst
.getHTML()
:</h3>';
|
|
|
216 |
|
h
+= '<div>'
+ tinyMCE
.xmlEncode
(inst.getH
TML()) + '
</div>';
|
|
|
217 |
|
|
|
|
218 |
|
if
(inst.ser
ializedHTM
L) {
|
|
|
219 |
|
h += '<h
3>Serializ
ed HTML co
ntent - in
st.seriali
zedHTML:</
h3>';
|
|
|
220 |
|
h += '<d
iv>' + tin
yMCE.xmlEn
code(inst.
serialized
HTML) + '<
/div>';
|
|
|
221 |
|
}
|
|
|
222 |
|
}
|
|
|
223 |
|
|
|
|
224 |
|
se.inn
erHTML = h
;
|
|
|
225 |
|
}
|
|
|
226 |
|
|
|
|
227 |
|
function r
enderComma
ndStates()
{
|
|
|
228 |
|
var se
= documen
t.getEleme
ntById('co
mmand_stat
es'), n, i
nst, h = '
', v, ex;
|
|
|
229 |
|
var cm
ds = new A
rray('2D-P
osition','
AbsolutePo
sition','B
ackColor',
'BlockDirL
TR','Block
DirRTL','B
old','Brow
seMode','C
opy','Crea
teBookmark
','CreateL
ink','Cut'
,'Delete',
'DirLTR','
DirRTL','E
ditMode','
enableInli
neTableEdi
ting','ena
bleObjectR
esizing','
FontName',
'FontSize'
,'ForeColo
r','Format
Block','In
dent','Ins
ertButton'
,'InsertFi
eldset','I
nsertHoriz
ontalRule'
,'InsertIF
rame','Ins
ertImage',
'InsertInp
utButton',
'InsertInp
utCheckbox
','InsertI
nputFileUp
load','Ins
ertInputHi
dden','Ins
ertInputIm
age','Inse
rtInputPas
sword','In
sertInputR
adio','Ins
ertInputRe
set','Inse
rtInputSub
mit','Inse
rtInputTex
t','Insert
Marquee','
InsertOrde
redList','
InsertPara
graph','In
sertSelect
Dropdown',
'InsertSel
ectListbox
','InsertT
extArea','
InsertUnor
deredList'
,'Italic',
'JustifyCe
nter','Jus
tifyFull',
'JustifyLe
ft','Justi
fyNone','J
ustifyRigh
t','LiveRe
size','Mul
tipleSelec
tion','Ope
n','Outden
t','OverWr
ite','Past
e','PlayIm
age','Redo
','Refresh
','RemoveF
ormat','Sa
veAs','Sel
ectAll','S
izeToContr
ol','SizeT
oControlHe
ight','Siz
eToControl
Width','St
op','StopI
mage','Str
ikeThrough
','styleWi
thCSS','Su
bscript','
Superscrip
t','UnBook
mark','Und
erline','U
ndo','Unli
nk','Unsel
ect'), i;
|
|
|
230 |
|
|
|
|
231 |
|
for (n
in tinyMC
E.instance
s) {
|
|
|
232 |
|
in
st = tinyM
CE.instanc
es[n];
|
|
|
233 |
|
|
|
|
234 |
|
if
(!tinyMCE
.isInstanc
e(inst))
|
|
|
235 |
|
continue
;
|
|
|
236 |
|
|
|
|
237 |
|
h
+= '<h2>In
stance id:
' + inst.
editorId +
'</h2>';
|
|
|
238 |
|
h
+= '<table
border="0
" cellpadd
ing="0" ce
llspacing=
"0" class=
"data">';
|
|
|
239 |
|
|
|
|
240 |
|
fo
r (i=0; i<
cmds.lengt
h; i++) {
|
|
|
241 |
|
v = null
;
|
|
|
242 |
|
|
|
|
243 |
|
try {
|
|
|
244 |
|
v =
tinyMCE.is
Gecko || i
nst.getDoc
().queryCo
mmandSuppo
rted(cmds[
i]);
|
|
|
245 |
|
v =
v ? inst.q
ueryComman
dState(cmd
s[i]) : 'N
ot support
ed';
|
|
|
246 |
|
} catch
(ex) {
|
|
|
247 |
|
v =
'Not suppo
rted';
|
|
|
248 |
|
}
|
|
|
249 |
|
|
|
|
250 |
|
h += '<t
r><td><inp
ut type="t
ext" value
="' + tiny
MCE.xmlEnc
ode(cmds[i
]) + '" />
</td><td><
input type
="text" va
lue="' + t
inyMCE.xml
Encode(v)
+ '" /></t
d></tr>';
|
|
|
251 |
|
}
|
|
|
252 |
|
|
|
|
253 |
|
h
+= '</tabl
e>';
|
|
|
254 |
|
}
|
|
|
255 |
|
|
|
|
256 |
|
se.inn
erHTML = h
;
|
|
|
257 |
|
}
|
|
|
258 |
|
|
|
|
259 |
|
function r
enderUndoR
edo() {
|
|
|
260 |
|
var se
= documen
t.getEleme
ntById('un
do_redo'),
inst, n,
h = '', i,
le, id, d
, ur;
|
|
|
261 |
|
var f
= document
.forms[0];
|
|
|
262 |
|
|
|
|
263 |
|
if (ti
nyMCE.undo
Levels) {
|
|
|
264 |
|
le
= tinyMCE
.undoLevel
s;
|
|
|
265 |
|
|
|
|
266 |
|
h
+= '<h2>Gl
obal undo/
redo</h2>'
;
|
|
|
267 |
|
h
+= '<table
border="0
" cellpadd
ing="0" ce
llspacing=
"0" width=
"50%" clas
s="data">'
;
|
|
|
268 |
|
h
+= '<tr><t
d>undoLeve
ls.length<
/td><td>'
+ le.lengt
h + '</td>
</tr>';
|
|
|
269 |
|
h
+= '<tr><t
d>undoInde
x</td><td>
' + tinyMC
E.undoInde
x + '</td>
</tr>';
|
|
|
270 |
|
h
+= '</tabl
e>';
|
|
|
271 |
|
|
|
|
272 |
|
fo
r (i=0; i<
le.length;
i++)
|
|
|
273 |
|
h += '<h
3>Level: '
+ i + ',
Instance:
' + (le[i]
? le[i].e
ditorId :
'null') +
'</h3>';
|
|
|
274 |
|
}
|
|
|
275 |
|
|
|
|
276 |
|
for (n
in tinyMC
E.instance
s) {
|
|
|
277 |
|
in
st = tinyM
CE.instanc
es[n];
|
|
|
278 |
|
|
|
|
279 |
|
if
(!tinyMCE
.isInstanc
e(inst))
|
|
|
280 |
|
continue
;
|
|
|
281 |
|
|
|
|
282 |
|
ur
= inst.un
doRedo;
|
|
|
283 |
|
le
= ur.undo
Levels;
|
|
|
284 |
|
|
|
|
285 |
|
h
+= '<hr />
<h2>Instan
ce id: ' +
inst.edit
orId + '</
h2>';
|
|
|
286 |
|
h
+= '<table
border="0
" cellpadd
ing="0" ce
llspacing=
"0" width=
"50%" clas
s="data">'
;
|
|
|
287 |
|
h
+= '<tr><t
d>undoLeve
ls.length<
/td><td>'
+ le.lengt
h + '</td>
</tr>';
|
|
|
288 |
|
h
+= '<tr><t
d>undoInde
x</td><td>
' + ur.und
oIndex + '
</td></tr>
';
|
|
|
289 |
|
h
+= '<tr><t
d>typingUn
doIndex</t
d><td>' +
ur.typingU
ndoIndex +
'</td></t
r>';
|
|
|
290 |
|
h
+= '<tr><t
d>undoRedo
</td><td>'
+ ur.undo
Redo + '</
td></tr>';
|
|
|
291 |
|
h
+= '</tabl
e>';
|
|
|
292 |
|
|
|
|
293 |
|
fo
r (i=0; i<
le.length;
i++) {
|
|
|
294 |
|
h += '<h
3>Level: '
+ i + (!l
e[i].bookm
ark ? "" :
" [bookma
rk]") + '<
/h3>';
|
|
|
295 |
|
h += '<d
iv class="
undodata">
' + tinyMC
E.xmlEncod
e(le[i].co
ntent) + '
</div>';
|
|
|
296 |
|
|
|
|
297 |
|
if (i >
0 && f.und
o_diff.che
cked) {
|
|
|
298 |
|
d =
diff_main(
i > 0 ? le
[i-1].cont
ent.replac
e(/[\r\n]+
/g, '') :
null, le[i
].content.
replace(/[
\r\n]+/g,
''), false
);
|
|
|
299 |
|
diff
_cleanup_s
emantic(d)
;
|
|
|
300 |
|
h +=
'<h3>Diff
' + (i-1)
+ ',' + i
+ '</h3><
div class=
"undodata"
>' + diff_
prettyhtml
(d) + '</d
iv>';
|
|
|
301 |
|
}
|
|
|
302 |
|
}
|
|
|
303 |
|
}
|
|
|
304 |
|
|
|
|
305 |
|
se.inn
erHTML = h
;
|
|
|
306 |
|
}
|
|
|
307 |
|
|
|
|
308 |
|
function c
learLog()
{
|
|
|
309 |
|
docume
nt.getElem
entById('l
og').inner
HTML = '';
|
|
|
310 |
|
devkit
._startTim
e = null;
|
|
|
311 |
|
}
|
|
|
312 |
|
|
|
|
313 |
|
function c
ancelActio
n() {
|
|
|
314 |
|
parent
.document.
getElement
ById('devk
it').style
.display =
'none';
|
|
|
315 |
|
}
|
|
|
316 |
|
|
|
|
317 |
|
function t
oggleDebug
Events(s)
{
|
|
|
318 |
|
devkit
._debugEve
nts(s);
|
|
|
319 |
|
}
|
|
|
320 |
|
|
|
|
321 |
|
function s
toreSelect
ion() {
|
|
|
322 |
|
book =
tinyMCE.s
electedIns
tance.sele
ction.getB
ookmark();
|
|
|
323 |
|
|
|
|
324 |
|
return
false;
|
|
|
325 |
|
}
|
|
|
326 |
|
|
|
|
327 |
|
function r
estoreSele
ction() {
|
|
|
328 |
|
tinyMC
E.selected
Instance.s
election.m
oveToBookm
ark(book);
|
|
|
329 |
|
|
|
|
330 |
|
return
false;
|
|
|
331 |
|
}
|
|
|