Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-09-18 07:04:26

gazchap
New member
Registered: 2006-09-18
Posts: 4

Not working in Firefox?

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

#2 2006-09-18 08:46:39

koto
Xinha Pro
Registered: 2006-01-09
Posts: 58

Re: Not working in Firefox?

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

#3 2006-09-19 01:14:00

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Not working in Firefox?

Ensure both the name and id of the textarea are 'xinhacontent' and that the HTML on your page is well formed.


James Sleeman

Offline

#4 2006-09-19 04:15:39

gazchap
New member
Registered: 2006-09-18
Posts: 4

Re: Not working in Firefox?

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 wink

Offline

Board footer

Powered by FluxBB