You are not logged in.
how do you meen.
this is my form page
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>index</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 skin, add the name here
</script>
<script type="text/javascript" src="XinhaCore.js"></script>
<script type="text/javascript" src="xinha_config.js"></script>
</head>
<body>
<form action="">
<textarea id="dst_messageBody1" name="dst_messageBody1" rows="10" cols="50" style="width: 100%"></textarea>
</form>
</body>
</html>
and this is my xinha_config.js file
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.
*
* The list of plugins below is a good starting point, but if you prefer
* a must 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',
'SpellChecker',
'Stylist',
'SuperClean',
'TableOperations'
];
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING smile
if(!Xinha.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 :
[
'dst_messageBody1',
];
/** 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();
xinha_config = new Xinha.Config();
xinha_config.toolbar =
[
["popupeditor"],
["separator","formatblock","fontname","fontsize"],
["separator","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"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite"]),
["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
["separator","htmlmode","showhelp"]
];
/** 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','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 = 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.myTextArea.config.width = '640px';
* xinha_editors.myTextArea.config.height = '480px';
*
************************************************************************/
/** 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
Hope this helps
Last edited by Mr P!nk (2007-09-06 06:12:13)
Offline
Have you looked at the examples? "View Source" should help.
Offline
@Mr P!nk (#174): No you can't have attributes unquoted. Anyway why do want it?
Because in using xinha as part of a mailing distributor, and its all done in .PHP, when the mail is received the links have to be
<a href=www.link.co.uk>link</a> because it has quotes in the code you get an error as such
outbind://92-0000000019DBFA65C2052B409E8CB59302038A4F24062E00/%22http:/www.link.co.uk/%22
this is due to a link parse which runs in the back end of the mailing files, it turns " into /, but at the same time when you enter the code in the way i need it , the parser converts it on the outbound to the recipients inbox thus creating a valid link.
i would have thought there would be a line in the .js that would state something like (this code is from the linker.js)
var _c={type:"url",href:"http://www.example.com/"}
and all's you'd have to do is remove
var _c={type:"url",href:http://www.example.com/}
but after hours of fiddling about i couldn't find it hence my posting.
so is there no way at all i can re-jig something to my needs?
cheers
Offline
Thanks, Pink. Just what I needed.
But no, I totally forgot about the examples. My bad!
EDIT: After copying your codes directly into my files and adjusting the URLs, i got...this (Click to enlarge).
Test-Text by me. Ignore it at your leisure.
Suggested source of the problem?
EDIT2: Ah, my bad once again, I messed up some links, it seems. Now it works. It looks, however, just like the "newbie"-example. Does it mean there's more fancy buttons I can unlock on the toolbar?
EDIT3: Frankly, I'm developing a certain inability to comprehend these strange mechanisms. After messing up the file again during a little experiment, emptying it and doing it again - presumably exactly the same as before -, it actually converted to what I see when I enter the "extended"-example. And it doesn't work.
Gee...I'm sorry fur doing such a bad job at simply USING xinha, but could you try to explain this to me?
EDIT4: Even more baffling, the "extended" example looks different now. Somewhat...cleaner. More orderly. Doesn't really help, though.
EDIT5: For good now. I got it to work. Sorry for this mess!
Last edited by Gil (2007-09-06 18:28:54)
Offline
so does it work fully now Gil?
Offline
Yeah, after a (sadly obvious) lot of struggling with the code to get it up and running, I eventually managed. Thanks to your code, I must mention.
Offline