You are not logged in.
uh oh - my bad - ok I will amend - however it did fix the problem I was having with the loading, if I didn't want to put an extra event in the body onload - this was a thing with the old htmlarea - a lot of times people either don't have access to the body onload due to file includes etc or it just isn't practical. Adding a script defer line definitely was not a good solution
akaEdge
Offline
For those of you wanting the advantage of replaceAll() with all the features of xinha:
Offline
Well.. i cant do it without help.
I've already done everything Guide NB said.
It works fine in IE but i got a plain textarea in Firefox 1.0.3... how could this be possible??
Plz, help me.
thx in advance.
Hami
Offline
Well.. i cant do it without help.
I've already done everything Guide NB said.
It works fine in IE but i got a plain textarea in Firefox 1.0.3... how could this be possible??
Plz, help me.
thx in advance.
Hami
Please provide more information or at least a link.
Offline
Hello,
I would like to use xinha for pages where i have no idea of the names of the textareas until the page is generated - am I able to include the config info on the fly, for example, as a script next tothe textarea element? Has anyone done this already?
Cheerio,
Nic.
Offline
I have followed the newbie guide but have failed to produce the editor. All I see is an empty textarea box. When I view the included examples: no editor, just empty textarea box. I am able to type in either box, but no GUI is present.
I have turned off magicquotes through .htaccess. Could this be the problem?
I did not see anything about setting permissions. Did I miss something I should have known intuitively?
Look here to see the empty textarea box I've created:
http://www.massreformedchurch.org/canedit/edit_1.htm
Look here to see my gui-less example:
http://www.massreformedchurch.org/xinha … ample.html
I then found the following example which displays gui, but only spits it out to an alert box:
http://www.massreformedchurch.org/xinha … stbed.html
So I then tried to follow the pattern there to get a gui to no avail:
http://www.massreformedchurch.org/canedit/edit_2.htm
What am I doing wrong?
Offline
3 plugins used by default on the example (ListType, Stylist, TableOperations) cant be found on your xinha installation. the full example is working as intended when we remove them from the plugin to use.
for your integration inside your actual system, are you sure about the _editor_url you set ?
I cant find a /public_html/xinha/ on your server, but i can access /xinha/, so try to replace /public_html/xinha/ to /xinha/
<script type="text/javascript">
_editor_url = "/public_html/xinha/" ;
_editor_lang = "en";
</script>
<script type="text/javascript" src="/public_html/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/public_html/xinha/my_config.js"></script>
to
_editor_url = "/xinha/" ;
_editor_lang = "en";
</script>
<script type="text/javascript" src="/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/xinha/my_config.js"></script>
Then, in your my_config.js, try to use plugins you have on your server (again, those 3 plugins cant be found on your server : ListType, Stylist, TableOperations) so dont use them in my_config.js
and everything should be better after that.
Offline
Yes. You were so right. I made those changes. Now I see the GUI and can post to a php page. Thank you very much.
Maybe you can help with this: When I click a button on the interface (font color or insert table, for example), I get a 404.
Offline
the directory /popups/ (blank.html, editor_help.html, select_color.html, popup.js, insert_table.html, insert_images.html, etc) is not found on your installation.
This directory is very required to make Xinha popups work, because required popups are in the /popups/ directory
Offline
Dear All,
I'm an old HTMLarea user. I have HTMLarea working in my CMS, but I would like to upgrade to Xinha. I just did a test run, and have found this more difficult than I had hoped. Following the Newbie Guide, I have gotten Xinha to do something with a textarea, but I'm not exactly sure what it's doing: 14 empty tool bars show up on my textarea, increasing the height and doing nothing more. No buttons show up. It does seem that HTML in the textarea is rendered as HTML, and the status bar on the bottom also seems to work. I have gone over my installation several times and can find no differences from the Newbie guide.
Any guidance anyone could provide would be greatly appreciated. Thank you in advance!
Sincerely,
Andrew
Offline
Dear All (again),
OK, I tried a fresh install on a page with only a form with a textarea, and I'm still having problems, though not as weird.
If you go to http://shabbosgoy.com you can see this attempt. There is one textarea that Xinha should recognize and create, but it doesn't. Weirdly, if I put 2 textareas on that page, they will both load Xinha as expected. When there is only one, I get this error from the Javascript Console in Firefox on Mac:
Error: textarea has no properties
Source File: http://shabbosgoy.com/xinha/htmlarea.js
Line: 98
Now, I'm not sure enough of myself in this endevor to know that this is a bug. If it is, I can definitely submit a ticket for it. Sadly, I suspect that it's merely a result of my inability.
Also, when it "works" with 2 Xinhas, some of the buttons don't show up correctly. I've placed an image on that page so that you can see what I see if you're not on Firefox for the Mac. Again, if encouraged to submit this as a ticket, I will gladly do so.
Thank you again for your time!
Andrew
Offline
I have been using HTMLarea for some time and have just started looking at xinha. I can install on my server (in /xinha/ folder ) and get the full example running just fine with no changing of any code.
When I create a page based on the newbie guide and set
_editor_url = "/xinha/";
and
<script type="text/javascript" src="/xinha/htmlarea.js"></script>
I get a standard textarea with no toolbars.
There are no javascript console errors.
Does anyone have a single very simple page of code based on the newbie example that works (no framesets etc as per the example code) which they could post for me to check I have not done or forgotten anything incredibly stupid?
When I open the example page xinha/examples/full_example-body.html I also get a blank textarea whereas it is fine when called by the /xinha/examples/full_example.html frameset. Not sure if this is relevant?
Thanks
Last edited by aeon (2005-06-25 09:17:56)
Offline
hello
@agoetz
on the url you provided, there is the following
<script type="text/javascript" src="/xinha/htmlarea.js"></script></head>
<script type="text/javascript" src="/xinha/my_config.js"></script>
<body>
the </head> is not in correct position inside the HTML document, script tag is not allowed in this place. Anyway, i dont think this is relevant to your actual issue. I think it is probably because in your file http://shabbosgoy.com/xinha/my_config.js we have 2 ID set in the variable xinha_editors
xinha_editors = xinha_editors ? xinha_editors :
[
'myTextArea',
'anotherOne'
];
Try to remove the 'anotherOne' ID from the config file to see if it fixes your problem.
@aeon
i have a simple example based on newbie guide code, http://mokhet.com/xinha/examples/simple_example.html
it is not my fav way to init Xinha, but it seems to work fine on my side.
http://xinha.python-hosting.com/ticket/232
http://xinha.python-hosting.com/wiki/Do … BasicUsage
Offline
Hi Mokhet thanks for that.
I copied your page code to xinha/examples/simple_example.html and it does not work. If nothing worked I would think I had files missing or corrupt but xinha/examples/full_example.html does work just fine! This is the same on two servers I am now testing on. Any further thoughts?
Offline
This may seem like deja vu. I had the thing working. Then I got the brilliant idea that I could store the input from the textarea in a mysql db table. It was not working. So I messed around until I finally went back to the newbie guide and started from scratch right back to downloading the nightly.
So, I have a working example on my server:
http://www.massreformedchurch.org/xinha … ample.html
But I can't get a gui on my own:
http://www.massreformedchurch.org/canedit/edit_3.htm
And here is the error:
Error: _editor_skin is not defined
Source File: http://www.massreformedchurch.org/xinha/htmlarea.js
Line: 1134
I do have folder called skins in my xinha directory.
This is within the head tags of edt_3.htm:
<script type="text/javascript">
_editor_url = "/xinha/" ; // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/xinha/my_config.js"></script>
Here's the call:
<textarea id="newbiearea1" name="newbiearea1" rows="10" cols="50" style="width: 100%"></textarea>
Modified areas of my_config.js:
xinha_plugins = xinha_plugins ? xinha_plugins :
[
'CharacterMap',
'ContextMenu'
];
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
/** STEP 2 ***************************************************************
* Now, what are the names of the textareas you will be turning into
* editors?
************************************************************************/
xinha_editors = xinha_editors ? xinha_editors :
[
'newbiearea1'
];
How do I get the gui to appear?
============================================================
And let's say I get the gui to appear, can I save the input to a mysql db table? How?
Offline
Hi, I’m having trouble with Xinha. I am pretty sure that I have everything set up ok but I am getting error messages. The main one is “Error: textarea has no properties
Source File: http://127.0.0.1/Experimental/Xinha/xinha/htmlarea.js
Line: 98”
If I remove one of the xinha_editors from the array then I get “Error: _editor_skin is not defined
Source File: http://127.0.0.1/Experimental/Xinha/xinha/htmlarea.js
Line: 1134”
Intuition leads me to suspect that xinha is having trouble with getting the right textarea.
It all sounds very similar to Glo's post.
Any help in this matter would be greatly appreciated.
Thanks
Robert
PS I just noticed that "xinha_editors" is defined and then redefined. could that be the trouble?
“
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>XINHA</title>
<script type="text/javascript">
_editor_url = "http://127.0.0.1/Experimental/Xinha/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="http://127.0.0.1/Experimental/Xinha/xinha/htmlarea.js"></script>
<script type="text/javascript">
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
// This contains the names of textareas we will make into Xinha editors
xinha_init = xinha_init ? xinha_init : function()
{
/** STEP 1 ***************************************************************
* First, what are the plugins you will be using in the editors on this
* page. List all the plugins you will need, even if not all the editors
* will use all the plugins.
************************************************************************/
xinha_plugins = xinha_plugins ? xinha_plugins :
[
'CharacterMap',
'ContextMenu',
'FullScreen',
'ListType',
'SpellChecker',
'Stylist',
'SuperClean',
'TableOperations'
];
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :)
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
/** STEP 2 ***************************************************************
* Now, what are the names of the textareas you will be turning into
* editors?
************************************************************************/
xinha_editors = xinha_editors ? xinha_editors :
[
'newbiearea1'
];
/** STEP 3 ***************************************************************
* We create a default configuration to be used by all the editors.
* If you wish to configure some of the editors differently this will be
* done in step 5.
*
* If you want to modify the default config you might do something like this.
*
* xinha_config = new HTMLArea.Config();
* xinha_config.width = '640px';
* xinha_config.height = '420px';
*
*************************************************************************/
//xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();
xinha_config = new HTMLArea.Config();
xinha_config.width = 640;
xinha_config.height = 420;
/** STEP 4 ***************************************************************
* We first create editors for the textareas.
*
* You can do this in two ways, either
*
* xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
*
* if you want all the editor objects to use the same set of plugins, OR;
*
* xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config);
* xinha_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']);
* xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']);
*
* if you want to use a different set of plugins for one or more of the
* editors.
************************************************************************/
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
/** STEP 5 ***************************************************************
* If you want to change the configuration variables of any of the
* editors, this is the place to do that, for example you might want to
* change the width and height of one of the editors, like this...
*
* xinha_editors.myTextArea.config.width = '640px';
* xinha_editors.myTextArea.config.height = '480px';
*
************************************************************************/
/** STEP 6 ***************************************************************
* Finally we "start" the editors, this turns the textareas into
* Xinha editors.
************************************************************************/
HTMLArea.startEditors(xinha_editors);
}
window.onload = xinha_init;
</script>
<link type="text/css" rel="stylesheet" title="blue-look" href="/skins/blue-look/skin.css" />
<link type="text/css" rel="alternate stylesheet" title="green-look" href="/skins/green-look/skin.css" />
<link type="text/css" rel="alternate stylesheet" title="xp-blue" href="/skins/xp-blue/skin.css" />
<link type="text/css" rel="alternate stylesheet" title="xp-green" href="/skins/xp-green/skin.css" />
<link type="text/css" rel="alternate stylesheet" title="inditreuse" href="/skins/inditreuse/skin.css" />
<link type="text/css" rel="alternate stylesheet" title="blue-metallic" href="/skins/blue-metallic/skin.css" />
</head>
<body>
<form action="javascript:var x = document.getElementById('editors_here');alert(x.myTextArea.value);" id="editors_here" onsubmit="alert(this.myTextArea.value);">
<textarea id="newbiearea1" name="newbiearea1" rows="10" cols="50" style="width: 100%">x</textarea>
<!--<textarea id="myTextArea" name="myTextArea" rows="10" cols="80" style="width:100%">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aliquam et tellus vitae justo varius placerat. Suspendisse iaculis
velit semper dolor. Donec gravida tincidunt mi. Curabitur tristique
ante elementum turpis. Aliquam nisl. Nulla posuere neque non
tellus. Morbi vel nibh. Cum sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus. Nam nec wisi. In wisi.
Curabitur pharetra bibendum lectus.</p>
</textarea>-->
<!--<textarea id="anotherOne" name="anotherOne" rows="10" cols="50" style="width: 100%"></textarea>-->
</form>
</body>
</html>
“
Offline
Hey all, I just downloaded Xinha and I am getting the following error in IE:
Line: 97
Char: 5
Error: 'style' is null or not an object
Code: 0
URL: ....
Here is my_config.js:
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
// This contains the names of textareas we will make into Xinha editors
xinha_init = xinha_init ? xinha_init : function()
{
/** STEP 1 ***************************************************************
* First, what are the plugins you will be using in the editors on this
* page. List all the plugins you will need, even if not all the editors
* will use all the plugins.
************************************************************************/
xinha_plugins = xinha_plugins ? xinha_plugins :
[
'CharacterMap',
'ContextMenu',
'FullScreen',
'ListType',
'SpellChecker',
'Stylist',
'SuperClean',
'TableOperations'
];
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :)
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
/** STEP 2 ***************************************************************
* Now, what are the names of the textareas you will be turning into
* editors?
************************************************************************/
xinha_editors = xinha_editors ? xinha_editors :
[
'question',
'answer'
];
/** STEP 3 ***************************************************************
* We create a default configuration to be used by all the editors.
* If you wish to configure some of the editors differently this will be
* done in step 5.
*
* If you want to modify the default config you might do something like this.
*
* xinha_config = new HTMLArea.Config();
* xinha_config.width = '640px';
* xinha_config.height = '420px';
*
*************************************************************************/
xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();
/** STEP 4 ***************************************************************
* We first create editors for the textareas.
*
* You can do this in two ways, either
*
* xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
*
* if you want all the editor objects to use the same set of plugins, OR;
*
* xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config);
* xinha_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']);
* xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']);
*
* if you want to use a different set of plugins for one or more of the
* editors.
************************************************************************/
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
/** STEP 5 ***************************************************************
* If you want to change the configuration variables of any of the
* editors, this is the place to do that, for example you might want to
* change the width and height of one of the editors, like this...
*
* xinha_editors.myTextArea.config.width = '640px';
* xinha_editors.myTextArea.config.height = '480px';
*
************************************************************************/
/** STEP 6 ***************************************************************
* Finally we "start" the editors, this turns the textareas into
* Xinha editors.
************************************************************************/
HTMLArea.startEditors(xinha_editors);
}
window.onload = xinha_init;
Here is the start of the webpage that calls it:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
_editor_url = "/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/xinha/my_config.js"></script>
</head>
<body>
Don't use Single ticks ' or else MySQL will do an error on the update.
<form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="faq_form" id="faq_form">
<table width="100%" border="0">
<tr>
<td>Question:</td>
<td> </td>
<td><textarea name="question" cols="50" rows="2" id="question"><?=$row['question']?></textarea></td>
</tr>
<tr>
<td>Answer:</td>
<td> </td>
<td><textarea name="answer" cols="50" rows="20" id="answer"><?=$row['answer']?></textarea></td>
</tr>
<tr>
<td colspan="3"><input name="commit" type="submit" id="commit" value="Commit">
<input type="reset" name="Reset" value="Revert"></td>
</tr>
</table>
<input type="hidden" name="ID" value="<?=$_REQUEST['ID']?>">
</form>
<a href="faq.php">Back</a> to list
</body>
As you can tell, this is a straight newbie guide following (I hope).
Offline
Hi FishGills
Your code works for me without any errors but only AFTER I set a value for _editor_skin so that xinha loads. This was in fact the cause of the problem I had that I posted above. Odd that the example provided by mokhet did not seem to include this and apparently works for him.... Perhaps there is some recent change in htmlarea.js??
The head of your html page now looks like this on my version:
<script type="text/javascript">
_editor_url = "/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
_editor_skin = "blue-look"; // set a skin for xinha to initialise
</script>
Anyhow no errors reported in IE or Firefox at my end. textareas are bizzarely sized in IE but thats another issue..
Offline
Hi all, thanks for your help.
Here is the line that fixed it: " _editor_skin = "blue-look"; // set a skin for xinha to initialise"
Aeon is a hero. :> Thank you most of all.
Just a suggestion but maybe the newbie guide should reflect this. At the moment the code snippet shown is:
<script type="text/javascript">
_editor_url = "/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="/xinha/htmlarea.js"></script>
I needed this to get it to work -
<script type="text/javascript">
_editor_url = "http://127.0.0.1/experimental/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
_editor_skin = "blue-look"; // set a skin for xinha to initialise
</script>
<script type="text/javascript" src="http://127.0.0.1/experimental/xinha/htmlarea.js"></script>
Keep up the good work. I'm loving what you've done so far.
Offline
Hi again.
Bad news.
I get the old "Error: textarea has no properties, Source File: http://127.0.0.1/experimental/xinha/htmlarea.js, Line: 98" whenever I list more than one textarea id in the "xinha_editors" array. This error is also reported as "Line: 97; Char: 5; Error: 'style' is null or not an object; Code: 0" in IE.
Any ideas?
Offline
Here's another strange thing - Whenever I submit a form with a xinha text area, the data that was entered into the field is not being picked up and passed on in the post.
For example, if I put a default value of "Text" and then add to that, the value that is passed is just "Text". The added stuff is not included.
(<textarea id="txtDescription" name="txtDescription" cols="100">Text</textarea>)
Any ideas?
Last edited by RampantRab (2005-07-06 05:26:04)
Offline
Just got the data to be posted ok
You need to use "[formname].onsubmit()" before [formname].submit(). Thanks to niko and all on "problem with javascript submit"
I've discovered another problem though. The menu is not being displayed properly in IE. FF is fine though. Any ideas?
Offline
using the full_example-body.html file.
I have the example up and running no problems so i though i would try and customise it.
I have edited full_example-body.html file and added a line to change the width as shown in the example.
/** STEP 5 ***************************************************************
* If you want to change the configuration variables of any of the
* editors, this is the place to do that, for example you might want to
* change the width and height of one of the editors, like this...
*
* xinha_editors.myTextArea.config.width = '640px';
* xinha_editors.myTextArea.config.height = '480px';
*
************************************************************************/
xinha_editors.myTextArea.config.width = '600px';
When i try and view the example full_example.html after adding this line
I get an error message that xinha_editors.myTextArea.config is null or not an object.
What am i missing ?
thanks
Offline
hi i have a problem with xinha install
i have upload xinha folder to my server
and i following the newbie guide
but it's still not show please anyone can advice me
folder for xinha is www.cis.co.th/xinha/
i dont know what i have do wrong please help
Offline