Changeset 962 for trunk/examples


Ignore:
Timestamp:
02/04/08 00:43:21 (11 years ago)
Author:
ray
Message:
  • #1149 [Safari] retain editing position doesn't work
  • #1148 HTML entities break when cursor is inside when switching from HTML to WYSIWYG
  • #1147 getSelectedHTML() throws error when nothing is selected
  • #1146 [ExtendedFileManager?] IE6 doesn't show images
Location:
trunk/examples
Files:
10 deleted
4 edited
10 copied

Legend:

Unmodified
Added
Removed
  • trunk/examples/Newbie.html

    r917 r962  
    1818<form action=""> 
    1919<div> 
    20 <textarea id="myTextArea" name="myTextArea" rows="10" cols="50" style="width: 100%"></textarea> 
     20<textarea id="myTextArea" name="myTextArea" rows="25" cols="50" style="width: 100%"></textarea> 
    2121</div> 
    2222</form> 
  • trunk/examples/XinhaConfig.js

    r937 r962  
    3939   'CharacterMap', 
    4040   'ContextMenu', 
    41    'ListType', 
     41   'SmartReplace', 
    4242   'Stylist', 
    4343   'Linker', 
  • trunk/examples/simple_example.html

    r836 r962  
    55<title>Simple example of Xinha</title> 
    66<script type="text/javascript"> 
    7 /************************************************************************ 
    8  * Please refer to http://xinha.python-hosting.com/wiki/NewbieGuide 
    9  ************************************************************************ 
    10  * You must set _editor_url to the URL (including trailing slash) where 
    11  * where xinha is installed, it's highly recommended to use an absolute URL 
    12  *  eg: _editor_url = "/path/to/xinha/"; 
    13  * You may try a relative URL if you wish] 
    14  *  eg: _editor_url = "../";   
    15  * in this example we do a little regular expression to find the absolute path. 
    16  ************************************************************************/ 
    177var _editor_url  = document.location.href.replace(/examples\/simple_example\.html.*/, '') 
    18 // And the language we need to use in the editor. 
     8 
    199var _editor_lang = "en"; 
    2010</script> 
     
    2212<script type="text/javascript" src="../XinhaCore.js"></script> 
    2313<script type="text/javascript"> 
    24 /************************************************************************ 
    25  * Plugins you will be using in the editors on this page. 
    26  * List all the plugins you will need, even if not all the editors will 
    27  * use all the plugins. 
    28  ************************************************************************ 
    29  * Please refer to http://xinha.python-hosting.com/wiki/Plugins for the 
    30  * list of availables plugins 
    31  ************************************************************************/ 
     14 
    3215var xinha_plugins = 
    3316[ 
    34  'CharacterMap', 
    35  'ContextMenu',  
    36  'ListType', 
    37  'SpellChecker', 
    38  'Stylist', 
    39  'SuperClean', 
    40  'TableOperations' 
     17 'Linker' 
    4118]; 
    42 /************************************************************************ 
    43  * Names of the textareas you will be turning into editors 
    44  ************************************************************************/ 
    4519var xinha_editors = 
    4620[ 
     
    4822  'anotherOne' 
    4923]; 
    50 /************************************************************************ 
    51  * Initialisation function 
    52  ************************************************************************/ 
     24 
    5325function xinha_init() 
    5426{ 
    55   // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :) 
    5627  if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return; 
    57   /************************************************************************* 
    58    * We create a default configuration to be used by all the editors. 
    59    * If you wish to configure some of the editors differently this will be 
    60    * done later after editors are initiated. 
    61    ************************************************************************ 
    62    * Please refer to http://xinha.python-hosting.com/wiki/Documentation/Customise 
    63    * for the configuration parameters 
    64    ************************************************************************/ 
     28 
    6529  var xinha_config = new Xinha.Config(); 
    66   /************************************************************************ 
    67    * We first create editors for the textareas. 
    68    * You can do this in two ways, either 
    69    * 
    70    *   xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
    71    * 
    72    * if you want all the editor objects to use the same set of plugins, OR; 
    73    * 
    74    *   xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config); 
    75    *   xinha_editors['myTextArea'].registerPlugins(['Stylist']); 
    76    *   xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']); 
    77    * 
    78    * if you want to use a different set of plugins for one or more of the 
    79    * editors. 
    80    ************************************************************************/ 
     30 
    8131  xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); 
    82   /************************************************************************ 
    83    * If you want to change the configuration variables of any of the 
    84    * editors,  this is the place to do that, for example you might want to 
    85    * change the width and height of one of the editors, like this... 
    86    ************************************************************************/ 
    87   xinha_editors.myTextArea.config.width = '640px'; 
    88   xinha_editors.myTextArea.config.height = '480px'; 
    89   /************************************************************************ 
    90    * Or remove the statusbar on the other one, like this... 
    91    * For every possible configuration, please refer to 
    92    * http://xinha.python-hosting.com/wiki/Documentation/ConfigVariablesList 
    93    ************************************************************************/ 
    94   xinha_editors.anotherOne.config.statusBar = false; 
    95   /************************************************************************ 
    96    * Finally we "start" the editors, this turns the textareas into 
    97    * Xinha editors. 
    98    ************************************************************************/ 
     32 
    9933  Xinha.startEditors(xinha_editors); 
    10034} 
    101 window.onload = xinha_init; 
     35Xinha.addOnloadHandler(xinha_init); 
    10236</script> 
    103 <link type="text/css" rel="stylesheet" title="blue-look" href="../skins/blue-look/skin.css"> 
    104 <link type="text/css" rel="alternate stylesheet" title="green-look" href="../skins/green-look/skin.css"> 
    105 <link type="text/css" rel="alternate stylesheet" title="xp-blue" href="../skins/xp-blue/skin.css"> 
    106 <link type="text/css" rel="alternate stylesheet" title="xp-green" href="../skins/xp-green/skin.css"> 
    107 <link type="text/css" rel="alternate stylesheet" title="inditreuse" href="../skins/inditreuse/skin.css"> 
    108 <link type="text/css" rel="alternate stylesheet" title="blue-metallic" href="../skins/blue-metallic/skin.css"> 
     37 
    10938</head> 
    11039 
    11140<body> 
    11241 
    113 <form onsubmit="alert(this.myTextArea.value); alert(this.anotherOne.value); return false;"> 
    114 <textarea id="myTextArea" name="myTextArea" rows="10" cols="80" style="width:100%"> 
     42<form onsubmit="alert(this.myTextArea.value); return false;"> 
     43<textarea id="myTextArea" name="myTextArea" rows="25" cols="80"> 
    11544&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
    11645Aliquam et tellus vitae justo varius placerat. Suspendisse iaculis 
     
    12150Curabitur pharetra bibendum lectus.&lt;/p&gt; 
    12251</textarea> 
    123 <textarea id="anotherOne" name="anotherOne" rows="10" cols="80" style="width:100%"> 
    124 &lt;ul&gt; 
    125 &lt;li&gt; Phasellus et massa sed diam viverra semper.  &lt;/li&gt; 
    126 &lt;li&gt; Mauris tincidunt felis in odio.              &lt;/li&gt; 
    127 &lt;li&gt; Nulla placerat nunc ut pede.                 &lt;/li&gt; 
    128 &lt;li&gt; Vivamus ultrices mi sit amet urna.           &lt;/li&gt; 
    129 &lt;li&gt; Quisque sed augue quis nunc laoreet volutpat.&lt;/li&gt; 
    130 &lt;li&gt; Nunc sit amet metus in tortor semper mattis. &lt;/li&gt; 
    131 &lt;/ul&gt; 
    132 </textarea> 
    133 <input type="submit"> 
    134 </form> 
    13552 
    13653</body> 
  • trunk/examples/testbed.html

    r897 r962  
    154154      &lt;/head&gt; 
    155155      &lt;body&gt; 
    156       &lt;img src="http://xinha.python-hosting.com/trac/logo.jpg" usemap="#m1"&gt; 
     156      &lt;img src="../images/xinha_logo.gif" usemap="#m1"&gt; 
    157157      &lt;map name="m1"&gt; 
    158158      &lt;area shape="rect" coords="137,101,255,124" href="http://www.mydomain.com"&gt; 
Note: See TracChangeset for help on using the changeset viewer.