1 |
|
var TinyMC
E_SimpleTh
eme={_butt
onMap:'bol
d,bullist,
cleanup,it
alic,numli
st,redo,st
rikethroug
h,underlin
e,undo',ge
tEditorTem
plate:func
tion(){var
html='';h
tml+='<tab
le class="
mceEditor"
border="0
" cellpadd
ing="0" ce
llspacing=
"0" width=
"{$width}"
height="{
$height}">
';html+='<
tr><td ali
gn="center
">';html+=
'<span id=
"{$editor_
id}">IFRAM
E</span>';
html+='</t
d></tr>';h
tml+='<tr>
<td class=
"mceToolba
r" align="
center" he
ight="1">'
;html+=tin
yMCE.getBu
ttonHTML('
bold','lan
g_bold_des
c','{$them
eurl}/imag
es/{$lang_
bold_img}'
,'Bold');h
tml+=tinyM
CE.getButt
onHTML('it
alic','lan
g_italic_d
esc','{$th
emeurl}/im
ages/{$lan
g_italic_i
mg}','Ital
ic');html+
=tinyMCE.g
etButtonHT
ML('underl
ine','lang
_underline
_desc','{$
themeurl}/
images/{$l
ang_underl
ine_img}',
'Underline
');html+=t
inyMCE.get
ButtonHTML
('striketh
rough','la
ng_striket
rough_desc
','{$theme
url}/image
s/striketh
rough.gif'
,'Striketh
rough');ht
ml+='<img
src="{$the
meurl}/ima
ges/separa
tor.gif" w
idth="2" h
eight="20"
class="mc
eSeparator
Line" />';
html+=tiny
MCE.getBut
tonHTML('u
ndo','lang
_undo_desc
','{$theme
url}/image
s/undo.gif
','Undo');
html+=tiny
MCE.getBut
tonHTML('r
edo','lang
_redo_desc
','{$theme
url}/image
s/redo.gif
','Redo');
html+='<im
g src="{$t
hemeurl}/i
mages/sepa
rator.gif"
width="2"
height="2
0" class="
mceSeparat
orLine" />
';html+=ti
nyMCE.getB
uttonHTML(
'cleanup',
'lang_clea
nup_desc',
'{$themeur
l}/images/
cleanup.gi
f','mceCle
anup');htm
l+='<img s
rc="{$them
eurl}/imag
es/separat
or.gif" wi
dth="2" he
ight="20"
class="mce
SeparatorL
ine" />';h
tml+=tinyM
CE.getButt
onHTML('bu
llist','la
ng_bullist
_desc','{$
themeurl}/
images/bul
list.gif',
'InsertUno
rderedList
');html+=t
inyMCE.get
ButtonHTML
('numlist'
,'lang_num
list_desc'
,'{$themeu
rl}/images
/numlist.g
if','Inser
tOrderedLi
st');html+
='</td></t
r></table>
';return{d
elta_width
:0,delta_h
eight:20,h
tml:html}}
,handleNod
eChange:fu
nction(edi
tor_id,nod
e){tinyMCE
.switchCla
ss(editor_
id+'_bold'
,'mceButto
nNormal');
tinyMCE.sw
itchClass(
editor_id+
'_italic',
'mceButton
Normal');t
inyMCE.swi
tchClass(e
ditor_id+'
_underline
','mceButt
onNormal')
;tinyMCE.s
witchClass
(editor_id
+'_striket
hrough','m
ceButtonNo
rmal');tin
yMCE.switc
hClass(edi
tor_id+'_b
ullist','m
ceButtonNo
rmal');tin
yMCE.switc
hClass(edi
tor_id+'_n
umlist','m
ceButtonNo
rmal');do{
switch(nod
e.nodeName
.toLowerCa
se()){case
"b":case"s
trong":tin
yMCE.switc
hClass(edi
tor_id+'_b
old','mceB
uttonSelec
ted');brea
k;case"i":
case"em":t
inyMCE.swi
tchClass(e
ditor_id+'
_italic','
mceButtonS
elected');
break;case
"u":tinyMC
E.switchCl
ass(editor
_id+'_unde
rline','mc
eButtonSel
ected');br
eak;case"s
trike":tin
yMCE.switc
hClass(edi
tor_id+'_s
trikethrou
gh','mceBu
ttonSelect
ed');break
;case"ul":
tinyMCE.sw
itchClass(
editor_id+
'_bullist'
,'mceButto
nSelected'
);break;ca
se"ol":tin
yMCE.switc
hClass(edi
tor_id+'_n
umlist','m
ceButtonSe
lected');b
reak}}whil
e((node=no
de.parentN
ode)!=null
)}};tinyMC
E.addTheme
("simple",
TinyMCE_Si
mpleTheme)
;tinyMCE.a
ddButtonMa
p(TinyMCE_
SimpleThem
e._buttonM
ap);
|
|
1 |
|
(function(
){var DOM=
tinymce.DO
M;tinymce.
ThemeManag
er.require
LangPack('
simple');t
inymce.cre
ate('tinym
ce.themes.
SimpleThem
e',{init:f
unction(ed
,url){var
t=this,sta
tes=['Bold
','Italic'
,'Underlin
e','Strike
through','
InsertUnor
deredList'
,'InsertOr
deredList'
],s=ed.set
tings;t.ed
itor=ed;ed
.onInit.ad
d(function
(){ed.onNo
deChange.a
dd(functio
n(ed,cm){t
inymce.eac
h(states,f
unction(c)
{cm.get(c.
toLowerCas
e()).setAc
tive(ed.qu
eryCommand
State(c));
});});ed.d
om.loadCSS
(url+"/ski
ns/"+s.ski
n+"/conten
t.css");})
;DOM.loadC
SS(url+"/s
kins/"+s.s
kin+"/ui.c
ss");},ren
derUI:func
tion(o){va
r t=this,n
=o.targetN
ode,ic,tb,
ed=t.edito
r,cf=ed.co
ntrolManag
er,sc;n=DO
M.insertAf
ter(DOM.cr
eate('span
',{id:ed.i
d+'_contai
ner','clas
s':'mceEdi
tor '+ed.s
ettings.sk
in+'Simple
Skin'}),n)
;n=sc=DOM.
add(n,'tab
le',{cellP
adding:0,c
ellSpacing
:0,'class'
:'mceLayou
t'});n=tb=
DOM.add(n,
'tbody');n
=DOM.add(t
b,'tr');n=
ic=DOM.add
(DOM.add(n
,'td'),'di
v',{'class
':'mceIfra
meContaine
r'});n=DOM
.add(DOM.a
dd(tb,'tr'
,{'class':
'last'}),'
td',{'clas
s':'mceToo
lbar mceLa
st',align:
'center'})
;tb=t.tool
bar=cf.cre
ateToolbar
("tools1")
;tb.add(cf
.createBut
ton('bold'
,{title:'s
imple.bold
_desc',cmd
:'Bold'}))
;tb.add(cf
.createBut
ton('itali
c',{title:
'simple.it
alic_desc'
,cmd:'Ital
ic'}));tb.
add(cf.cre
ateButton(
'underline
',{title:'
simple.und
erline_des
c',cmd:'Un
derline'})
);tb.add(c
f.createBu
tton('stri
kethrough'
,{title:'s
imple.stri
ketrough_d
esc',cmd:'
Strikethro
ugh'}));tb
.add(cf.cr
eateSepara
tor());tb.
add(cf.cre
ateButton(
'undo',{ti
tle:'simpl
e.undo_des
c',cmd:'Un
do'}));tb.
add(cf.cre
ateButton(
'redo',{ti
tle:'simpl
e.redo_des
c',cmd:'Re
do'}));tb.
add(cf.cre
ateSeparat
or());tb.a
dd(cf.crea
teButton('
cleanup',{
title:'sim
ple.cleanu
p_desc',cm
d:'mceClea
nup'}));tb
.add(cf.cr
eateSepara
tor());tb.
add(cf.cre
ateButton(
'insertuno
rderedlist
',{title:'
simple.bul
list_desc'
,cmd:'Inse
rtUnordere
dList'}));
tb.add(cf.
createButt
on('insert
orderedlis
t',{title:
'simple.nu
mlist_desc
',cmd:'Ins
ertOrdered
List'}));t
b.renderTo
(n);return
{iframeCon
tainer:ic,
editorCont
ainer:ed.i
d+'_contai
ner',sizeC
ontainer:s
c,deltaHei
ght:-20};}
,getInfo:f
unction(){
return{lon
gname:'Sim
ple theme'
,author:'M
oxiecode S
ystems AB'
,authorurl
:'http://t
inymce.mox
iecode.com
',version:
tinymce.ma
jorVersion
+"."+tinym
ce.minorVe
rsion}}});
tinymce.Th
emeManager
.add('simp
le',tinymc
e.themes.S
impleTheme
);})();
|