You are not logged in.
Pages: 1
Xinha : Release: Trunk (Fri, 24 Apr 2009 07:50:25 +1200)
Head: http://svn.xinha.webfactional.com/trunk/XinhaCore.js
Revision: 1188
Last Changed By: douglas
Browser : Opera 9.64
Hello,
I'm new to Xinha that seems to be a good WYSIWYG editor, while not working properly with Opera (hope it will be fixed one day).
I have read the documentation but my main problem is that Javascript is (much worse than) greek to me.
I need to use Xinha on 2 different textareas (descrtemp1 and descrtemp2) of the same page (php program).
My test program is basic :
<?
session_start();
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head><title>Calendrier-annuaire de la vie associative locale</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
<style type="text/css">
BODY { background: #BBEFFF; color: navy; font-family: Optimum,Helvetica,Verdana,sans-serif; font-size: medium; width: 80%; margin: auto; text-align: center;}
</style>
<script type="text/javascript">
_editor_url = "../xinha/"
_editor_lang = "fr";
</script>
<script type="text/javascript" src="../xinha/XinhaCore.js"></script>
<script type="text/javascript">
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
xinha_init = xinha_init ? xinha_init : function()
{
xinha_plugins = xinha_plugins ? xinha_plugins :
[
\'CharCounter\',
\'ContextMenu\',
\'ListType\',
\'SpellChecker\',
\'Stylist\',
\'SuperClean\',
// \'ExtendedFileManager\',
\'TableOperations\'
];
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
xinha_editors = xinha_editors ? xinha_editors :
[
\'descrtemp1\',
\'descrtemp2\'
];
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
Xinha.startEditors(xinha_editors);
}
window.onload = xinha_init;
</script>
</head>
<body>
<form action="voirtest.php" method="post" target="_blank">
<textarea id="descrtemp1" name="descrtemp1" rows="10" cols="50" style="width: 100%">'.$_SESSION['descrtemp1'].'</textarea>
<textarea id="descrtemp2" name="descrtemp2" rows="10" cols="50" style="width: 100%">'.$_SESSION['descrtemp2'].'</textarea>
<br>
<input type="image" name="submit" src="images/visu.gif" align="middle" alt="Visualiser">
</form>
</body></html>';
?>
I'm not sure that this code is correct...
Then, my other problem is that I need to limit the number of characters that people can type in each area, so, in CharCounter.js, I have set :
Xinha.Config.prototype.CharCounter =
{
'showChar': true, // show the characters count,
'showWord': true, // show the words count,
'showHtml': true, // show the exact html count
'separator': ' | ', // separator used to join informations
'maxHTML' : 500 //
Here the problem is that I need a different maximum length for the textareas : for instance, one will be limited at 500 characters, and the other one at 2500 characters. How can I do that ? And I would have prefered to limit the number of characters typed, not including the HTML tags.
Any help would be appreciated...
Last edited by Gythaogg (2009-08-20 09:44:27)
Offline
No help ?
Offline
Is my question so stupid that nobody wants to answer ?
Offline
Well, now I know that using Xinha was a bad idea, since nobody answers questions.
Offline
Pages: 1