You are not logged in.
Pages: 1
I'm afraid I can't give you the affected URL as the page is password protected. I can paste code though.
The editors work fine in MSIE, but I cannot get the editor working in Firefox 1.5.0.6 and Firefox 1.5.0.7. I don't know whether it works in earlier Firefox versions, I do not have any to hand.
Interestingly, I added an alert() into the xinha_init function and the alert works fine in all browsers. No errors show up in Firefox's JavaScript Console either (apart from a problem with it not understanding the "filter" property in htmlarea.css)
So I don't know what's going on, it's as if Xinha is loading and initialising but it just can't find the textarea to convert, even though the IDs are correct. Anyway, here's the code I'm using:
<script type="text/javascript">
_editor_url = "/eadmin/xinha/";
_editor_lang = "en";
</script>
<script type="text/javascript" src="/eadmin/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/eadmin/includes/xinha_config.js"></script>
The code in xinha_config.js:
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
xinha_init = xinha_init ? xinha_init : function()
{
xinha_plugins = [
'ContextMenu',
'FullScreen',
'ImageManager',
'InsertAnchor',
'InsertLink',
'Stylist'
];
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return false;
xinha_editors = xinha_editors ? xinha_editors : [
'xinhacontent'
];
xinha_config = new HTMLArea.Config();
xinha_config = new HTMLArea.Config();
xinha_config.flowToolbars = false;
xinha_config.statusBar = false;
xinha_config.toolbar = [
["forecolor", "bold", "italic", "underline", "separator"],
["strikethrough", "subscript", "superscript", "separator"],
["justifyleft", "justifycenter", "justifyright", "separator"],
["createlink", "insertimage", "removeformat", "htmlmode"]
];
xinha_config.pageStyle = "@import url(includes/xinha.css);";
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
HTMLArea.startEditors(xinha_editors);
};
window.onload = xinha_init;
Can anyone help? It's driving me nuts!
//edit: Using the latest nightly build (downloaded an hour or so ago)
//edit2: Noticed an extra comma in the plugins list, removed that just in case but it's still not working in Firefox.
Last edited by gazchap (2006-09-18 07:11:13)
Offline
You could try these:
- Comment the xinha_config.pageStyle line (just to make sure)
- Make sure that the textarea is inside <form> element, and the (X)HTML code is valid (I recommend HTML Validator Firefox extension)
- Clear the cache in the browser
Offline
Thanks, I suspect that the problem is that the HTML is malformed, I'm having to implement Xinha into something that one of my predecessors did years ago and he's not known for his code writing skills
Offline
Pages: 1