Ignore:
Timestamp:
05/19/05 15:28:30 (14 years ago)
Author:
gogo
Message:
  • Minor comment changes.
  • Refactor events for form submit, reset and window unload
  • Fix reset handler to properly use the original textarea content
  • Minor changes to setHTML etc
  • Use onload for iframe to determine when to initIframe, instead of a timeout
  • Remove overlooked debugging statement in loadPlugins
  • Change some event registrations to use addDom0Event rather than element.onxxx = something
  • Add HTMLArea.flushEvents() as an implementation of #30 - sadly, doesn't work. This is not enabled in the full_example, use examples/testbed.html to test it out.
  • Added methods HTMLArea.addDom0Event and HTMLArea.prependDom0Event which are to be used instead of element.onxxxxx = something;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/testbed.html

    r166 r177  
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    12<html> 
    23<head> 
     
    5152      xinha_plugins = xinha_plugins ? xinha_plugins : 
    5253      [ 
    53       'FullScreen', 
    54       'TableOperations' 
     54        'FullScreen' 
    5555      ]; 
    5656             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :) 
     
    118118 
    119119      HTMLArea.startEditors(xinha_editors); 
     120      window.onload = null; 
    120121    } 
    121122 
    122     window.onload = xinha_init; 
     123    window.onload   = xinha_init; 
     124    window.onunload = HTMLArea.flushEvents; 
    123125  </script> 
    124126</head> 
     
    127129 
    128130  <form action="javascript:var x = document.getElementById('editors_here');alert(x.myTextArea.value);" id="editors_here" onsubmit="alert(this.myTextArea.value);"> 
    129     <textarea id="myTextArea" name="myTextArea" style="width:100%;height:320"> 
     131    <textarea id="myTextArea" name="myTextArea" style="width:100%;height:320px;"> 
    130132      &lt;p&gt; 
    131133        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
     
    148150    </textarea> 
    149151 
    150     <input type="submit" /> 
     152    <input type="submit" /> <input type="reset" /> 
    151153  </form> 
    152  
    153154</body> 
    154155</html> 
Note: See TracChangeset for help on using the changeset viewer.