Changeset 649 for trunk/examples


Ignore:
Timestamp:
01/12/07 12:58:32 (13 years ago)
Author:
ray
Message:

Ticket #11 Change HTMLArea objects/namespace to Xinha

Location:
trunk/examples
Files:
3 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/ext_example-body.html

    r612 r649  
    3232 
    3333  <!-- Load up the actual editor core --> 
    34   <script type="text/javascript" src="../htmlarea.js"></script> 
     34  <script type="text/javascript" src="../XinhaCore.js"></script> 
    3535 
    3636  <script type="text/javascript"> 
     
    5555 
    5656      // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :) 
    57       if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return; 
     57      if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return; 
    5858 
    5959// What are the names of the textareas you will be turning into editors? 
     
    8888// Create a default configuration to be used by all the editors. 
    8989      settings = top.frames["menu"].settings; 
    90       xinha_config = new HTMLArea.Config(); 
     90      xinha_config = new Xinha.Config(); 
    9191      xinha_config.width = settings.width; 
    9292      xinha_config.height = settings.height; 
     
    164164// First create editors for the textareas. 
    165165// You can do this in two ways, either 
    166 //   xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
     166//   xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
    167167// if you want all the editor objects to use the same set of plugins, OR; 
    168 //   xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config); 
     168//   xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config); 
    169169//   xinha_editors['myTextarea0'].registerPlugins(['Stylist','FullScreen']); 
    170170//   xinha_editors['myTextarea1'].registerPlugins(['CSS','SuperClean']); 
    171171// if you want to use a different set of plugins for one or more of the editors. 
    172       xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
     172      xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
    173173 
    174174// If you want to change the configuration variables of any of the editors, 
     
    179179 
    180180// Finally we "start" the editors, this turns the textareas into Xinha editors. 
    181       HTMLArea.startEditors(xinha_editors); 
     181      Xinha.startEditors(xinha_editors); 
    182182    } 
    183183 
     
    194194 
    195195    window.onload = xinha_init; 
    196 //    window.onunload = HTMLArea.collectGarbageForIE; 
     196//    window.onunload = Xinha.collectGarbageForIE; 
    197197  </script> 
    198198</head> 
  • trunk/examples/ext_example-menu.php

    r560 r649  
    141141        // capture some window's events 
    142142        function capwin(w) { 
    143 //              HTMLArea._addEvent(w, "click", Dialog._parentEvent); 
    144 //              HTMLArea._addEvent(w, "mousedown", Dialog._parentEvent); 
    145 //              HTMLArea._addEvent(w, "focus", Dialog._parentEvent); 
     143//              Xinha._addEvent(w, "click", Dialog._parentEvent); 
     144//              Xinha._addEvent(w, "mousedown", Dialog._parentEvent); 
     145//              Xinha._addEvent(w, "focus", Dialog._parentEvent); 
    146146        }; 
    147147        // release the captured events 
    148148        function relwin(w) { 
    149 //              HTMLArea._removeEvent(w, "click", Dialog._parentEvent); 
    150 //              HTMLArea._removeEvent(w, "mousedown", Dialog._parentEvent); 
    151 //              HTMLArea._removeEvent(w, "focus", Dialog._parentEvent); 
     149//              Xinha._removeEvent(w, "click", Dialog._parentEvent); 
     150//              Xinha._removeEvent(w, "mousedown", Dialog._parentEvent); 
     151//              Xinha._removeEvent(w, "focus", Dialog._parentEvent); 
    152152        }; 
    153153        capwin(window); 
  • trunk/examples/simple_example.html

    r534 r649  
    1212 *  eg: _editor_url = "/path/to/xinha/"; 
    1313 * You may try a relative URL if you wish] 
    14  *  eg: _editor_url = "../"; 
     14 *  eg: _editor_url = "../";   
    1515 * in this example we do a little regular expression to find the absolute path. 
    1616 ************************************************************************/ 
     
    2020</script> 
    2121<!-- Load up the actual editor core --> 
    22 <script type="text/javascript" src="../htmlarea.js"></script> 
     22<script type="text/javascript" src="../XinhaCore.js"></script> 
    2323<script type="text/javascript"> 
    2424/************************************************************************ 
     
    5555{ 
    5656  // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :) 
    57   if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return; 
     57  if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return; 
    5858  /************************************************************************* 
    5959   * We create a default configuration to be used by all the editors. 
     
    6464   * for the configuration parameters 
    6565   ************************************************************************/ 
    66   var xinha_config = new HTMLArea.Config(); 
     66  var xinha_config = new Xinha.Config(); 
    6767  /************************************************************************ 
    6868   * We first create editors for the textareas. 
    6969   * You can do this in two ways, either 
    7070   * 
    71    *   xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
     71   *   xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
    7272   * 
    7373   * if you want all the editor objects to use the same set of plugins, OR; 
    7474   * 
    75    *   xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config); 
     75   *   xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config); 
    7676   *   xinha_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']); 
    7777   *   xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']); 
     
    8080   * editors. 
    8181   ************************************************************************/ 
    82   xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
     82  xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
    8383  /************************************************************************ 
    8484   * If you want to change the configuration variables of any of the 
     
    9898   * Xinha editors. 
    9999   ************************************************************************/ 
    100   HTMLArea.startEditors(xinha_editors); 
     100  Xinha.startEditors(xinha_editors); 
    101101} 
    102102window.onload = xinha_init; 
  • trunk/examples/testbed.html

    r277 r649  
    3636 
    3737  <!-- Load up the actual editor core --> 
    38   <script type="text/javascript" src="../htmlarea.js"></script> 
     38  <script type="text/javascript" src="../XinhaCore.js"></script> 
    3939 
    4040  <script type="text/javascript"> 
     
    5858      ]; 
    5959             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :) 
    60              if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return; 
     60             if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return; 
    6161 
    6262      /** STEP 2 *************************************************************** 
     
    7777       * If you want to modify the default config you might do something like this. 
    7878       * 
    79        *   xinha_config = new HTMLArea.Config(); 
     79       *   xinha_config = new Xinha.Config(); 
    8080       *   xinha_config.width  = 640; 
    8181       *   xinha_config.height = 420; 
     
    8383       *************************************************************************/ 
    8484 
    85        xinha_config = xinha_config ? xinha_config : new HTMLArea.Config(); 
     85       xinha_config = xinha_config ? xinha_config : new Xinha.Config(); 
    8686/* 
    8787       // We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL 
     
    101101       * You can do this in two ways, either 
    102102       * 
    103        *   xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
     103       *   xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
    104104       * 
    105105       * if you want all the editor objects to use the same set of plugins, OR; 
    106106       * 
    107        *   xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config); 
     107       *   xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config); 
    108108       *   xinha_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']); 
    109109       *   xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']); 
     
    113113       ************************************************************************/ 
    114114 
    115       xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
     115      xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
    116116 
    117117      /** STEP 4 *************************************************************** 
     
    131131       ************************************************************************/ 
    132132 
    133       HTMLArea.startEditors(xinha_editors); 
     133      Xinha.startEditors(xinha_editors); 
    134134      window.onload = null; 
    135135    } 
    136136 
    137137    window.onload   = xinha_init; 
    138     // window.onunload = HTMLArea.collectGarbageForIE; 
     138    // window.onunload = Xinha.collectGarbageForIE; 
    139139  </script> 
    140140</head> 
Note: See TracChangeset for help on using the changeset viewer.