%PDF- %PDF-
Direktori : /data/down/eBOOKS/JavaScripty/ |
Current File : //data/down/eBOOKS//JavaScripty/HTML Editor.html |
<!-- This script has been in the http://www.javascripts.com Javascript Public Library! --> <!-- Note that though this material may have been in a public depository, certain author copyright restrictions may apply. --> <HTML> <HEAD> <TITLE>TagPad Editor for HTML</TITLE> </HEAD> <BODY BGCOLOR=#C0C0C0 FGCOLOR=#000000 VLINK=#FF8080> <FONT FACE="Comic Sans MS"> <CENTER> <FONT SIZE=5><B>HTML TAGPAD</B></FONT><BR> <FONT SIZE=3 COLOR=#808080>Current version 2.13 07-12-98</FONT><BR> </CENTER> <HR> <FORM METHOD="Post" ACTION=""> <SCRIPT LANGUAGE = "JavaScript"> <!--We are hiding this SCRIPT from all you Old Browsers - so what do you think about that! document.write('<CENTER>') document.write('<B>HTML EDITOR DOCUMENT BUTTON PAD</B><BR>') document.write('<input type="button" value=" <A>" onClick="tagButton(this.form,sANCH)">') document.write('<input type="button" value="</A>" onClick="tagButton(this.form,eANCH)">') document.write('<input type="button" value=" <BR>" onClick="tagButton(this.form,sLINE)">') document.write('<input type="button" value=" <HR>" onClick="tagButton(this.form,sHORZ)">') document.write('<input type="button" value=" <P> " onClick="tagButton(this.form,sPARA)">') document.write('<input type="button" value=" </P>" onClick="tagButton(this.form,ePARA)">') document.write('<input type="button" value=" <H1>" onClick="tagButton(this.form,sHDR1)">') document.write('<input type="button" value=" <H2>" onClick="tagButton(this.form,sHDR2)">') document.write('<input type="button" value=" <H3>" onClick="tagButton(this.form,sHDR3)">') document.write('<input type="button" value=" <H4>" onClick="tagButton(this.form,sHDR4)">') document.write('<input type="button" value=" <H5>" onClick="tagButton(this.form,sHDR5)">') document.write('<input type="button" value=" <H6>" onClick="tagButton(this.form,sHDR6)">') document.write('<input type="button" value="</H1>" onClick="tagButton(this.form,eHDR1)">') document.write('<input type="button" value="</H2>" onClick="tagButton(this.form,eHDR2)">') document.write('<input type="button" value="</H3>" onClick="tagButton(this.form,eHDR3)">') document.write('<input type="button" value="</H4>" onClick="tagButton(this.form,eHDR4)"><BR>') document.write('<input type="button" value="</H5>" onClick="tagButton(this.form,eHDR5)">') document.write('<input type="button" value="</H6>" onClick="tagButton(this.form,eHDR6)">') document.write('<input type="button" value=" <HTML> " onClick="tagButton(this.form,sHTML)">') document.write('<input type="button" value=" </HTML>" onClick="tagButton(this.form,eHTML)">') document.write('<input type="button" value=" <HEAD> " onClick="tagButton(this.form,sHEAD)">') document.write('<input type="button" value=" </HEAD>" onClick="tagButton(this.form,eHEAD)">') document.write('<input type="button" value=" <TITLE>" onClick="tagButton(this.form,sTITL)">') document.write('<input type="button" value="</TITLE>" onClick="tagButton(this.form,eTITL)">') document.write('<input type="button" value=" <BODY> " onClick="tagButton(this.form,sBODY)">') document.write('<input type="button" value=" </BODY>" onClick="tagButton(this.form,eBODY)"><BR>') document.write('<input type="button" value=" <FORM> " onClick="tagButton(this.form,sFORM)">') document.write('<input type="button" value=" </FORM> " onClick="tagButton(this.form,eFORM)">') document.write('<input type="button" value=" <CENTER>" onClick="tagButton(this.form,sCNTR)">') document.write('<input type="button" value="</CENTER>" onClick="tagButton(this.form,eCNTR)">') document.write('<input type="button" value=" <TABLE> " onClick="tagButton(this.form,sTABL)">') document.write('<input type="button" value=" </TABLE>" onClick="tagButton(this.form,eTABL)">') document.write('<input type="button" value="<SCRIPT>" onClick="tagButton(this.form,sSCRP)">') document.write('<input type="button" value="</SCRIPT>" onClick="tagButton(this.form,eSCRP)"><BR>') document.write('<input type="button" value="<ADDRESS>" onClick="tagButton(this.form,sADDR)">') document.write('<input type="button" value="</ADDRESS>" onClick="tagButton(this.form,eADDR)">') document.write('<input type="button" value="<TEXTAREA>" onClick="tagButton(this.form,sAREA)">') document.write('<input type="button" value="</TEXTAREA>" onClick="tagButton(this.form,eAREA)">') document.write('<input type="button" value=" <FONT> " onClick="tagButton(this.form,sFONT)">') document.write('<input type="button" value=" </FONT> " onClick="tagButton(this.form,eFONT)">') document.write('<input type="button" value="<IMG>" onClick="tagButton(this.form,sIMAG)">') document.write('<input type="button" value=" <B> " onClick="tagButton(this.form,sBOLD)"><BR>') document.write('<input type="button" value=" <I> " onClick="tagButton(this.form,sITAL)">') document.write('<input type="button" value=" </I>" onClick="tagButton(this.form,eITAL)">') document.write('<input type="button" value=" <OL>" onClick="tagButton(this.form,sOLST)">') document.write('<input type="button" value="</OL>" onClick="tagButton(this.form,eOLST)">') document.write('<input type="button" value=" <LI>" onClick="tagButton(this.form,sLIST)">') document.write('<input type="button" value=" <UL>" onClick="tagButton(this.form,sULST)">') document.write('<input type="button" value="</UL>" onClick="tagButton(this.form,eULST)">') document.write('<input type="button" value=" <TD>" onClick="tagButton(this.form,sTDEF)">') document.write('<input type="button" value=" <TR>" onClick="tagButton(this.form,sTROW)">') document.write('<input type="button" value=" <DL>" onClick="tagButton(this.form,sDLST)">') document.write('<input type="button" value="</DL>" onClick="tagButton(this.form,eDLST)">') document.write('<input type="button" value=" <DT>" onClick="tagButton(this.form,sDTRM)">') document.write('<input type="button" value=" <DD>" onClick="tagButton(this.form,sDDEF)"><BR>') document.write('<HR>') function eReset (form) { form.TEXT.value = "" } function tagInsert (textinsert,mode,moretext){ // ...this fuction defines the object this.textinsert = textinsert this.mode = mode this.moretext = moretext } sANCH = new tagInsert ( "<A>","0","") eANCH = new tagInsert ( "</A> \n","0","") sLINE = new tagInsert ( "<BR> \n","0","") sHORZ = new tagInsert ( "<HR> \n","0","") sPARA = new tagInsert ( "<P> \n","0","") ePARA = new tagInsert ( "</P> \n","0","") sHDR1 = new tagInsert ( "<H1>","1","") eHDR1 = new tagInsert ( "</H1> \n","0","") sHDR2 = new tagInsert ( "<H2>","1","") eHDR2 = new tagInsert ( "</H2> \n","0","") sHDR3 = new tagInsert ( "<H3>","1","") eHDR3 = new tagInsert ( "</H3> \n","0","") sHDR4 = new tagInsert ( "<H4>","1","") eHDR4 = new tagInsert ( "</H4> \n","0","") sHDR5 = new tagInsert ( "<H5>","1","") eHDR5 = new tagInsert ( "</H5> \n","0","") sHDR6 = new tagInsert ( "<H6>","1","") eHDR6 = new tagInsert ( "</H6> \n","0","") sHTML = new tagInsert ( "<HTML> \n","0","") eHTML = new tagInsert ( "</HTML> \n","0","") sHEAD = new tagInsert ( "<HEAD> \n","0","") eHEAD = new tagInsert ( "</HEAD> \n","0","") sTITL = new tagInsert ( "<TITLE> \n","0","") eTITL = new tagInsert ( "</TITLE> \n","0","") sBODY = new tagInsert ( "<BODY> \n","0","") eBODY = new tagInsert ( "</BODY> \n","0","") sFORM = new tagInsert ( "<FORM> \n","0","") eFORM = new tagInsert ( "</FORM> \n","0","") sCNTR = new tagInsert ( "<CENTER> \n","0","") eCNTR = new tagInsert ( "</CENTER> \n","0","") sTABL = new tagInsert ( "<TABLE> \n","0","") eTABL = new tagInsert ( "</TABLE> \n","0","") sSCRP = new tagInsert ( "<SCRIPT> \n","0","") eSCRP = new tagInsert ( "</SCRIPT> \n","0","") sADDR = new tagInsert ( "<ADDRESS> \n","0","") eADDR = new tagInsert ( "</ADDRESS> \n","0","") sAREA = new tagInsert ( "<TEXTAREA> \n","0","") eAREA = new tagInsert ( "</TEXTAREA> \n","0","") sFONT = new tagInsert ( "<FONT> \n","0","") eFONT = new tagInsert ( "</FONT> \n","0","") sIMAG = new tagInsert ( "<IMG> \n","0","") sBOLD = new tagInsert ( "<B> \n","0","") sITAL = new tagInsert ( "<I> \n","0","") eITAL = new tagInsert ( "</I> \n","0","") sOLST = new tagInsert ( "<OL> \n","0","") eOLST = new tagInsert ( "</OL> \n","0","") sLIST = new tagInsert ( "<LI> \n","0","") sULST = new tagInsert ( "<UL> \n","0","") eULST = new tagInsert ( "</UL> \n","0","") sTDEF = new tagInsert ( "<TD>","0","") sTROW = new tagInsert ( "<TR>","0","") sDLST = new tagInsert ( "<DL> \n","0","") eDLST = new tagInsert ( "</DL> \n","0","") sDTRM = new tagInsert ( "<DT>","0","") sDDEF = new tagInsert ( "<DD>","0","") function tagButton (form,selector){ addTag (form,selector) } function addTag (form,selector){ addText=selector.textinsert if (selector.mode = 1){ addText += moreTag(selector,addText) form.TEXT.value += addText } else{ form.TEXT.value += addText } } function moreTag(selector,addText){ addText = "" x="" x = prompt("Enter text added to tag...Ignore and hit OK if no text required!","") if ((x != null) && (x != "")){ addText = x } return addText } function preview(form) { msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=yes"); msg.document.write(form.TEXT.value); } function save() { alert('Save file by either copying and pasting into notepad or another editor OR preview page then select file/saveas and enter new name.') } function about() { alert('htmlTAGPAD created by Aaron Corder July,1998.') } function help() { alert('CAUTION ! ...Still in progress but will be a walk through showing HOW TO use html tags.') } <!-- done hiding from old browsers --> </SCRIPT> <CENTER> <B>HTML EDITOR DOCUMENT WORK ZONE</B><BR> <TEXTAREA NAME="TEXT" ROWS="10" COLS="60" WRAP="VIRTUAL"></TEXTAREA><br> <INPUT TYPE="reset" VALUE= " CLEAR " onClick="eReset(this.form)"> <INPUT TYPE="button" VALUE=" PREVIEW " onClick="preview(this.form)"> <INPUT TYPE="button" VALUE=" SAVE " onClick="save()"> <INPUT TYPE="button" VALUE=" ABOUT " onClick="about()"> <INPUT TYPE="button" VALUE=" HELP " onClick="help()"> </FORM><BR> Copyright 1998 Aaron Corder, 405 Applecross Drive Cary, NC 27511<BR> <HR> <ADDRESS> This site designed by <A HREF="http://www.freeyellow.com/members5/cordersweb/">CORDERSWEB®</A> member of <FONT COLOR=#FFFFC0>FREEYELLOW.COM</FONT> and <A HREF="http://www.geocities.com/heartland/village/2346">GEOCITIES.COM</A> EMAIL ME at <A HREF="mailto:corders@geocities.com">webmaster@cordersweb.com</A>. <BR><FONT COLOR=#008080>Copyrighted 1998 by CORDERSWEB</FONT> </ADDRESS> </CENTER> </BODY> </HTML> <!-- Simba says Roar. -->