htmlarea v3 bachillerato

65
// htmlArea v3.0 - Copyright (c) 2002, 2003 interactivetools.com, inc. // This copyright notice MUST stay intact for use (see license.txt). // // Portions (c) dynarch.com, 2003-2004 // // A free WYSIWYG editor replacement for <textarea> fields. // For full source code and docs, visit http://www.interactivetools.com/ // // Version 3.0 developed by Mihai Bazon. // http://dynarch.com/mishoo // // $Id: htmlarea.php,v 1.1.1.1 2010/11/19 00:04:19 csvm Exp $ if (typeof _editor_url == "string") { // Leave exactly one backslash at the end of _editor_url _editor_url = _editor_url.replace(/\x2f*$/, '/'); } else { //alert("WARNING: _editor_url is not set! You should set this variable to the editor files path; it should preferably be an absolute path, like in '/htmlarea', but it can be relative if you prefer. Further we will try to load the editor files correctly but we'll probably fail."); _editor_url = 'http://juntos.enlinea.org.mx/asignaturas/moodle/lib/editor/htmlarea/';// we need relative path to site root for editor in pages wit hrequired https } // make sure we have a language if (typeof _editor_lang == "string") { _editor_lang = "en"; // should always be english in moodle. } else { _editor_lang = "en"; } // Creates a new HTMLArea object. Tries to replace the textarea with the given // ID with it. function HTMLArea(textarea, config) { if (HTMLArea.checkSupportedBrowser()) { if (typeof config == "undefined") { this.config = new HTMLArea.Config(); } else { this.config = config; } this._htmlArea = null; this._textArea = textarea;

Upload: john-knopfler-corona

Post on 18-Aug-2015

228 views

Category:

Documents


0 download

DESCRIPTION

programacion html de una página

TRANSCRIPT

// htmlArea v3.0 - Copyright (c) 2002, 2003 interactivetools.com, inc.// This copyright notice MUT stay intact !or "se (see license.t#t).//// $ortions (c) %ynarch.com, 2003-200&//// A !ree '()'(* e%itor replacement !or +te#tarea, !iel%s.// -or !"ll so"rce co%e an% %ocs, visit http./////.interactivetools.com///// 0ersion 3.0 %evelope% 1y Mihai 2a3on.// http.//%ynarch.com/mishoo//// 4)%. htmlarea.php,v 5.5.5.5 2050/55/56 00.0&.56 csvm 7#p 4i! (typeo! 8e%itor8"rl 99 :string:) ;// /(4N>/)/A// Hope!"lly a complete list o! tags that M)7s parser /ill consi%er// as possi1le content tags. Cetrieve% !rom// http./////.echoecho.com/htmlre!erence.htmHTM/P(aNa11rNacronymNa%%ressNappletNareaN1N1aseN1ase!ontN1%oN1gso"n%N1igN1lin=N1loc=G"oteN1o%yN1rN1"ttonNcaptionNcenterNciteNco%eNcolNcolgro"pNcommentN%%N%elN%!nN%irN%ivN%lN%tNemNem1e%N!iel%setN!ontN!ormN!rameN!ramesetNh5Nh2Nh3Nh&NhQNhRNhea%NhrNhtmlNiNi!rameNilayerNimgNinp"tNinsNisin%e#N=1%N=eygenNla1elNlayerNlegen%NliNlin=NmapNmarG"eeNmen"NmetaNm"lticolNno1rNnoem1e%Nno!ramesNnolayerNnoscriptNo1FectNolNoptgro"pNoptionNpNparamNplainte#tNpreNGNsNsampNscriptNselectNserverNsmallNspacerNspanNstri=eNstrongNstyleNs"1Ns"pNta1leNt1o%yNt%Nte#tareaNt!ootNthNthea%NtitleNtrNttN"N"lNvar)4/iHTM/PspanKO,L?,/gi,@ @).replace(/+>/P%ivKO,L?,/gi,@ @).replace(/+>/PpreKO,L?,/gi,@ @).replace(/+(>/P)(hK5-RLM)KO,L?,/gi,@+4542,@)A// KKO>LL?>L--,/gi,@ @)A//remove empty tags//I 9 I.replace(/+strong,+>/strong,/gi,@@).//replace(/+i,+>/i,/gi,@@).//replace(/+$KO,L?,+>/$,/gi,@@)AI 9 I.replace(/+hK5-RLM,>sP+>/hK5-RLM,/gi, @@)A // Cemove empty hea%ings// n"=e %o"1le tagsol%len 9 I.length M 5A/hile(ol%len , I.length) ;ol%len 9 I.lengthA// Foin "s no/ an% !ree the tags, /e@ll 1e !ree hac=ers, /e@ll 1e !ree... A-)I 9 I.replace(/+(Ka-3LKa-3L?), ?+>/>5,/gi,@ @).replace(/+(Ka-3LKa-3L?), ?+(Ka-3LKO,L?), ?+>/>5,/gi,@+42,@)ABI 9 I.replace(/+(Ka-3LKa-3L?),+>5,/gi,@+45,@).replace(/+>/(Ka-3LKa-3L?),+>/>5,/gi,@+>/45,@)A// n"=e %o"1le spacesI 9 I.replace(/?/gi,@ @)A// plit into lines an% remove// empty lines an% a%% carriage ret"rns 1ac=var splitter9 />K1r>L/gAvar emptysM>sM4/gAvar strHTM< 9 @@Avar ton@ABI 9 strHTM