Changes between Version 1 and Version 2 of Documentation/BasicUsage


Ignore:
Timestamp:
01/12/07 14:19:26 (11 years ago)
Author:
ray
Comment:

changed reference to HTMLArea and htmlarea.js and added mime types for syntax highlighting of the examples

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/BasicUsage

    v1 v2  
    1515 
    1616{{{ 
     17#!text/html 
    1718<script type="text/javascript"> 
    1819 _editor_url = "/xinha/"; 
    1920 _editor_lang = "en"; 
    2021</script> 
    21 <script type="text/javascript" src="/xinha/htmlarea.js"></script> 
     22<script type="text/javascript" src="/xinha/XinhaCore.js"></script> 
    2223}}} 
    2324 
    2425== Form preparation == 
    2526The TEXTAREA that's need to be turned into a Xinha editor, absoluty require an ID, uniq ID obviously. 
     27 
    2628{{{ 
     29#!text/html 
    2730<form> 
    2831<textarea id="description"></texarea> 
     
    4043=== Xinha start === 
    4144Once the document is loaded, the init function must be triggered. There is quite a lot of methods to do it, the two easiest for our first example here are : 
     45 
    4246{{{ 
     47#!text/html 
    4348<body onload="initXinha();"> 
    4449}}} 
     
    4651or the method we will use here 
    4752 
     53 
    4854{{{ 
     55#!text/x-javascript 
    4956window.onload = initXinha; 
    5057}}} 
     
    5259Which finally give the following result. 
    5360 
     61 
    5462{{{ 
     63#!text/html 
    5564<script type="text/javascript"> 
    5665var editeur = null; 
    5766function initXinha() { 
    58  var config = new HTMLArea.Config(); 
    59  editeur = HTMLArea.makeEditors(['description'], config); 
    60  HTMLArea.startEditors(editeur); 
     67 var config = new Xinha.Config(); 
     68 editeur = Xinha.makeEditors(['description'], config); 
     69 Xinha.startEditors(editeur); 
    6170} 
    6271window.onload = initXinha; 
     
    6574 
    6675== Complete source code == 
     76 
    6777{{{ 
     78#!text/html 
    6879<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 
    6980<html> 
     
    7586_editor_lang = "en"; 
    7687</script> 
    77 <script type="text/javascript" src="/xinha/htmlarea.js"></script> 
     88<script type="text/javascript" src="/xinha/XinhaCore.js"></script> 
    7889<script type="text/javascript"> 
    7990var editeur = null; 
    8091function initXinha() { 
    81  var config = new HTMLArea.Config(); 
    82  editeur = HTMLArea.makeEditors(['description'], config); 
    83  HTMLArea.startEditors(editeur); 
     92 var config = new Xinha.Config(); 
     93 editeur = Xinha.makeEditors(['description'], config); 
     94 Xinha.startEditors(editeur); 
    8495} 
    8596window.onload = initXinha;