Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/03/2009, 16:53
cara_luna
 
Fecha de Ingreso: marzo-2009
Mensajes: 74
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: Ayuda con editor de texto para mi web

Segunda parte: Este es el cuerpo del editor entre <body> y</body>:

Código javascript:
Ver original
  1. <P><STRONG><FONT size=3>Online Content Editor</FONT></STRONG></P>
  2.  
  3. <table id="tblCoolbar" width=542 cellpadding="0" cellspacing="0">
  4. <tr valign="middle">
  5.  
  6.     <td colspan=16>
  7.         <select onchange="cmdExec('formatBlock',this[this.selectedIndex].value);this.selectedIndex=0">
  8.             <option selected>Style</option>
  9.             <option value="Normal">Normal</option>
  10.             <option value="Heading 1">Heading 1</option>
  11.             <option value="Heading 2">Heading 2</option>
  12.             <option value="Heading 3">Heading 3</option>
  13.             <option value="Heading 4">Heading 4</option>
  14.             <option value="Heading 5">Heading 5</option>
  15.             <option value="Address">Address</option>
  16.             <option value="Formatted">Formatted</option>
  17.             <option value="Definition Term">Definition Term</option>
  18.         </select>
  19.         <select onchange="cmdExec('fontname',this[this.selectedIndex].value);">
  20.             <option selected>Font</option>
  21.             <option value="Arial">Arial</option>
  22.             <option value="Arial Black">Arial Black</option>
  23.             <option value="Arial Narrow">Arial Narrow</option>
  24.             <option value="Comic Sans MS">Comic Sans MS</option>
  25.             <option value="Courier New">Courier New</option>
  26.             <option value="System">System</option>
  27.             <option value="Tahoma">Tahoma</option>
  28.             <option value="Times New Roman">Times New Roman</option>
  29.             <option value="Verdana">Verdana</option>
  30.             <option value="Wingdings">Wingdings</option>
  31.         </select>
  32.         <select onchange="cmdExec('fontsize',this[this.selectedIndex].value);">
  33.             <option selected>Size</option>
  34.             <option value="1">1</option>
  35.             <option value="2">2</option>
  36.             <option value="3">3</option>
  37.             <option value="4">4</option>
  38.             <option value="5">5</option>
  39.             <option value="6">6</option>
  40.             <option value="7">7</option>
  41.             <option value="8">8</option>
  42.             <option value="10">10</option>
  43.             <option value="12">12</option>
  44.             <option value="14">14</option>
  45.         </select>
  46.        
  47.     </td>
  48.    
  49. </tr>
  50. <tr>
  51.  
  52.     <td><div class="cbtn" onClick="cmdExec('cut')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  53.     <img hspace="1" vspace=1 align=middle src="bs_cut.gif" alt="Cut" width="16" height="16">
  54.     </div></td>
  55.    
  56.     <td><div class="cbtn" onClick="cmdExec('copy')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  57.     <img hspace="1" vspace=1 align=middle src="bs_copy.gif" alt="Copy" width="16" height="16">
  58.     </div></td>
  59.    
  60.     <td><div class="cbtn" onClick="cmdExec('paste')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  61.     <img hspace="1" vspace=1 align=middle src="bs_paste.gif" alt="Paste" width="16" height="16">
  62.     </div></td>
  63.    
  64.     <td><div class="cbtn" onClick="cmdExec('bold')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  65.     <img hspace="1" vspace=1 align=middle src="bs_formatBold_en.gif" alt="Bold" width="16" height="16">
  66.     </div></td>
  67.    
  68.     <td><div class="cbtn" onClick="cmdExec('italic')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  69.     <img hspace="1" vspace=1 align=middle src="bs_formatItalic_en.gif" alt="Italic" width="16" height="16">
  70.     </div></td>
  71.    
  72.     <td><div class="cbtn" onClick="cmdExec('underline')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  73.     <img hspace="1" vspace=1 align=middle src="bs_formatUnderline.gif" alt="Underline" width="16" height="16">
  74.     </div></td>    
  75.        
  76.     <td><div class="cbtn" onClick="cmdExec('justifyleft')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  77.     <img hspace="1" vspace=1 align=middle src="bs_alignLeft.gif" alt="Justify Left" width="16" height="16">
  78.     </div></td>
  79.    
  80.     <td><div class="cbtn" onClick="cmdExec('justifycenter')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  81.     <img hspace="1" vspace=1 align=middle src="buttons/bs_alignCenter.gif" alt="Center" width="16" height="16">
  82.     </div></td>
  83.    
  84.     <td><div class="cbtn" onClick="cmdExec('justifyright')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  85.     <img hspace="1" vspace=1 align=middle src="bs_alignRight.gif" alt="Justify Right" width="16" height="16">
  86.     </div></td>    
  87.    
  88.     <td><div class="cbtn" onClick="cmdExec('insertorderedlist')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  89.     <img hspace="2" vspace=1 align=middle src="buttons/bs_ol.gif" alt="Ordered List" width="16" height="16">
  90.     </div></td>
  91.  
  92.     <td><div class="cbtn" onClick="cmdExec('insertunorderedlist')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  93.     <img hspace="2" vspace=1 align=middle src="bs_ul.gif" alt="Unordered List" width="16" height="16">
  94.     </div></td>
  95.        
  96.     <td><div class="cbtn" onClick="cmdExec('outdent')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  97.     <img hspace="2" vspace=1 align=middle src="bs_outdent.gif" alt="Decrease Indent" width="16" height="16">
  98.     </div></td>
  99.    
  100.     <td><div class="cbtn" onClick="cmdExec('indent')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  101.     <img hspace="2" vspace=1 align=middle src="bs_indent.gif" alt="Increase Indent" width="16" height="16">
  102.     </div></td>        
  103.    
  104.     <td><div class="cbtn" onClick="foreColor()" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  105.     <img hspace="2" vspace=1 align=middle src="bs_fgColor.gif" alt="Forecolor" width="16" height="16">
  106.     </div></td>        
  107.  
  108.     <td><div class="cbtn" onClick="cmdExec('createLink')" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  109.     <img hspace="2" vspace=1 align=middle src="createLink.gif" alt="Link" width="21" height="20">
  110.     </div></td>
  111.    
  112.     <td><div class="cbtn" onClick="insertImage()" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  113.     <img hspace="2" vspace=1 align=middle src="image.gif" alt="Image" width="20" height="20">
  114.     </div></td>    
  115.    
  116.     <td><div class="cbtn" onClick="Save()" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);">
  117.     <img  hspace="2" vspace=1 align=absmiddle align=absmiddle src="bs_save.gif" alt="Save" width="16" height="16"><font class=txtbtn>&nbsp;</font>
  118.     </div></td>    
  119.        
  120.     <td width=200></td>
  121.    
  122. </tr>
  123. </table>
  124.  
  125. <iframe width="542" id="idContent" height="350"></iframe>
  126. <br>
  127. <input type="checkbox" onclick="setMode(this.checked)" value="ON"> Edit HTML

Última edición por cara_luna; 18/03/2009 a las 20:26