Ticket #1198: xinha.html

File xinha.html, 2.1 KB (added by guest, 10 years ago)

sizeEditor bug Example

Line 
1<html>
2<head>
3<title>xinha test</tilte>
4
5<script type="text/javascript">
6    _editor_url  = "xinha/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed
7    _editor_lang = "en";      // And the language we need to use in the editor.
8    _editor_skin = "silva";   // If you want use a skin, add the name (of the folder) here
9</script>
10<script type="text/javascript" src="xinha/XinhaCore.js"></script>
11<script type="text/javascript">
12xinha_editors = null;
13xinha_init    = null;
14xinha_config  = null;
15xinha_plugins = null;
16
17//Xinha.loadPlugin('Stylist');
18
19// This contains the names of textareas we will make into Xinha editors
20xinha_init = xinha_init ? xinha_init : function()
21{
22  xinha_editors = xinha_editors ? xinha_editors :
23  [
24    'newbiearea1'
25  ];
26
27  xinha_plugins = xinha_plugins ? xinha_plugins :
28  [
29   'CharacterMap',
30   'ContextMenu',
31   'ListType',
32   'Stylist',
33   //'Linker',
34   'SuperClean',
35   'TableOperations'
36  ];
37 
38         // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
39         if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
40
41   xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
42   
43       
44   // To adjust the styling inside the editor, we can load an external stylesheet like this
45   // NOTE : YOU MUST GIVE AN ABSOLUTE URL
46   //xinha_config.stylistLoadStylesheet(_editor_url + "examples/full_example.css");
47   xinha_config.stylistLoadStyles('p.red_text { color:red }');
48   xinha_config.pageStyleSheets = [ _editor_url + "examples/full_example.css" ];
49
50  xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
51
52  Xinha.startEditors(xinha_editors);
53}
54
55Xinha._addEvent(window,'load', xinha_init); // this executes the xinha_init function on page load
56                                            // and does not interfere with window.onload properties set by other scripts
57</script>
58
59</head>
60<body>
61  <div style="float:left;width:380px;border:1px solid black;padding:10px">
62    <textarea id="newbiearea1" name="newbiearea1" rows="10" cols="50" style="width: 100%"></textarea>
63  </div>
64</body>
65</html>