You are not logged in.
Pages: 1
I'm not sure what's going on here, I though this was working
I try a simple editor with just a text area and I can get the the content of a text area nps, If I try to do it with xinha, I get nothing
easy.html
--------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Test</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.
_editor_skin = "silva"; // If you want use a skin, add the name (of the folder) here
</script>
<script type="text/javascript" src="xinha/XinhaLoader.js"></script>
<script type="text/javascript" src="my_config.js"></script>
</head>
<body>
<form method="post" name="article" action="rtest.php">
<textarea id="articlebody" name="articlebody" rows="10" cols="50" style="width: 100%"></textarea>
<input name="article_completed" type="submit" value="Save">
</form>
</body>
</html>
rtest.php - try to get the results
---------------------------------------
<?php
$articlebody = $_POST['articlebody'];
echo htmlspecialchars($articlebody);
?>
I really would like some help with this, any takers?
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, specify the textareas that shall be turned into Xinhas.
* For each one add the respective id to the xinha_editors array.
* I you want add more than on textarea, keep in mind that these
* values are comma seperated BUT there is no comma after the last value.
* If you are going to use this configuration on several pages with different
* textarea ids, you can add them all. The ones that are not found on the
* current page will just be skipped.
************************************************************************/
xinha_editors = xinha_editors ? xinha_editors :
[
"articlebody"
];
/** STEP 2 ***************************************************************
* Now, 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.
*
* The list of plugins below is a good starting point, but if you prefer
* a simpler editor to start with then you can use the following
*
* xinha_plugins = xinha_plugins ? xinha_plugins : [ ];
*
* which will load no extra plugins at all.
************************************************************************/
xinha_plugins = xinha_plugins ? xinha_plugins :
[
'CharacterMap',
'ContextMenu',
'ListType',
'Stylist',
'Linker',
'SuperClean',
'TableOperations',
'ImageManager'
// 'ExtendedFileManager'
];
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
/** 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 Xinha.Config();
* xinha_config.width = '640px';
* xinha_config.height = '420px';
*
*************************************************************************/
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
//this is the standard toolbar, feel free to remove buttons as you like
xinha_config.toolbar =
[
["popupeditor"],
["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
["separator","forecolor","hilitecolor","textindicator"],
["separator","subscript","superscript"],
["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
["separator","showhelp","about"]
];
/** STEP 4 ***************************************************************
* We first create editors for the textareas.
*
* You can do this in two ways, either
*
* xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
*
* if you want all the editor objects to use the same set of plugins, OR;
*
* xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config);
* xinha_editors.myTextArea.registerPlugins(['Stylist']);
* 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 = Xinha.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.articlebody.config.width = '640px';
* xinha_editors.articlebody.config.height = '480px';
*
************************************************************************/
xinha_editors.articlebody.config.width = '723px';
xinha_editors.articlebody.config.height = '450px';
/** STEP 6 ***************************************************************
* Finally we "start" the editors, this turns the textareas into
* Xinha editors.
************************************************************************/
Xinha.startEditors(xinha_editors);
}
Xinha._addEvent(window,'load', xinha_init); // this executes the xinha_init function on page load
// and does not interfere with window.onload properties set by other scripts
Offline
What version of Xinha?
Have you tried with the current trunk?
Does Xinha display?
What does print_r($_REQUEST) give you?
Have you confirmed that without Xinha the EXACT SAME html as would have been sent by Xinha does not exhibit the same problem (eg a mod_security restriction or some such)?
Have you tried without plugins?
Is the HTML page (easy.html) you pasted above the EXACT html page you are using, are you certain you are no badly wrapping your form in in incorrect table elements ( common mistake: <table><form><tr><td> or similar instead of <form><table> or <td><form>).
James Sleeman
Offline
Xinha_0.95.zip
Current trunk?
xinha displays a normal xinha editor
print $request gives the following (note, article body should have the text, i entered BLAH)
Array ( [Dialog13] => url [Dialog17] => http://www.example.com/ [Dialog18] => [Dialog20] => [Dialog21] => [Dialog22] => PopupWindow [Dialog23] => resizeable=yes [Dialog24] => alice@example.com [Dialog25] => [Dialog26] => [Dialog1] => on [Dialog2] => on [Dialog3] => on [Dialog4] => on [Dialog5] => on [Dialog6] => on [article_body] => [article_completed] => Save [__utma] => 243130631.1685551870.1258544383.1258544383.1258544383.1 [__utmb] => 243130631.1.10.1258544383 [__utmc] => 243130631 [__utmz] => 243130631.1258544383.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
withou xinha i get the following
Array ( [article_body] => BLAH [article_completed] => Save [__utma] => 243130631.1685551870.1258544383.1258544383.1258544383.1 [__utmb] => 243130631.1.10.1258544383 [__utmc] => 243130631 [__utmz] => 243130631.1258544383.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) )
I have no plugins?
Is the HTML page (easy.html) you pasted above the EXACT html page you are using, are you certain you are no badly wrapping your form in in incorrect table elements ( common mistake: <table><form><tr><td> or similar instead of <form><table> or <td><form>).
It is an exact copy and paste
Offline
Try in the current SVN trunk.
Try disabling the plugins you have enabled
'CharacterMap',
'ContextMenu',
'ListType',
'Stylist',
'Linker',
'SuperClean',
'TableOperations',
'ImageManager'
If you do not resolve the issue with the above, please place an example online and provide a URL to it.
James Sleeman
Offline
plugins removed but still no joy
http://www.twocentsite.com/easy.php
The only thing I did to xinhas config files was some changes to the configs of imagemanager and exendedfilemanager. I have since put a fresh xinha install in place but the results are still the same. I have also tried using bith XinhaCore and XinhaLoader I have also tried creating the my_onfig from scratch again, all with no results.
I'm sure I hade this working at some stage. The scripts all have permission to run and I have tried this on 3 different workstations to make sure it isn't the machine.
Cheers
Offline
Your test works for me.
Array
(
[Dialog13] => url
[Dialog17] => http://www.example.com/
[Dialog18] =>
[Dialog20] =>
[Dialog21] =>
[Dialog22] => PopupWindow
[Dialog23] => resizeable=yes
[Dialog24] => alice@example.com
[Dialog25] =>
[Dialog26] =>
[Dialog1] => on
[Dialog2] => on
[Dialog3] => on
[Dialog4] => on
[Dialog5] => on
[Dialog6] => on
[articlebody] => <p>test</p>
<p> </p>
[article_completed] => Save
)
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5
James Sleeman
Offline
And yet, when I do it I get
Array ( [Dialog13] => url [Dialog17] => http://www.example.com/ [Dialog18] => [Dialog20] => [Dialog21] => [Dialog22] => PopupWindow [Dialog23] => resizeable=yes [Dialog24] => alice@example.com [Dialog25] => [Dialog26] => [Dialog1] => on [Dialog2] => on [Dialog3] => on [Dialog4] => on [Dialog5] => on [Dialog6] => on [articlebody] => [article_completed] => Save [__utma] => 243130631.268242624.1256854619.1256857591.1258601726.3 [__utmz] => 243130631.1256854619.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) [__utmc] => 243130631 )
with nothing in the articlebody column
Offline
Ahh, well that's interesting, it works with ie but not firefox???
Last edited by struggle (2009-11-19 04:18:35)
Offline
So is there a problem with xinha and firefox?
Offline
As I stated, it works for me: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5
I suggest you
1. Use the latest trunk from the subversion repository
2. Ensure your firefox is up to date
3. If still no success ensure you disable all your firefox addons and see if that works
James Sleeman
Offline
I have the same problem. It works in ei but not in chrome or firefox. Installed the latest from downloads.
It seems that the content of the textarea is not posted with the form. I can't access it via javascript either:
document.form1.theTextArea.value gives me: Cannot read property 'value' of undefined
Any ideas?
/J
Offline
Installed the latest xinha 096beta2
Firefox is latest version 3.55
disabled all firefox addons
disbaled all xinha plugins
Still no joy
Cheers
Andrew
Offline
Strangely, the extended example works fine and loads the data into the display area
Offline
Again, try with the latest trunk.
http://trac.xinha.org/browser/trunk ---> at the bottom of the page "Zip Archive"
Try also with a totally fresh version of Firefox or at least on a different computer, I wouldn't be surprised if you have some weird addon or toolbar or something you have forgotten to disable or which can not be disabled.
James Sleeman
Offline
Ahh, now i'm making progress, I copied the config file from the extended example into my working directory and hey presto, it works, I'll try to find the offending line in my config and post it here
Offline
Here is my latest config, it works with the latest Xinha, no idea what I did to make it work but work it does
Cheers James and thanks for the help
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
xinha_init = xinha_init ? xinha_init : function()
{
xinha_editors = xinha_editors ? xinha_editors : [ "articlebody" ];
xinha_plugins = xinha_plugins ? xinha_plugins :
[ 'CharacterMap', 'ContextMenu', 'ListType', 'Stylist', 'Linker', 'SuperClean', 'TableOperations', 'ExtendedFileManager' ];
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
xinha_config.toolbar =
[
["popupeditor"],
["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
["separator","forecolor","hilitecolor","textindicator"],
["separator","subscript","superscript"],
["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
["separator","showhelp","about"]
];
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
xinha_editors.articlebody.config.width = '723px';
xinha_editors.articlebody.config.height = '450px';
Xinha.startEditors(xinha_editors);
}
Xinha._addEvent(window,'load', xinha_init);
Offline
Pages: 1