Announcement

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

#1 2010-08-23 06:00:56

yoyo
New member
Registered: 2010-08-23
Posts: 3

Xinha not loading in the HTC files

Hi,

I want Xinha to be loaded from HTC component's script. Below is the source from HTC file. Below script is actually snapshot of the simple_example.html under the example folder. 

<HTML xmlns="http://www.abc.com">
    <HEAD>   
    <TITLE>Simple example of Xinha</TITLE>
    <SCRIPT type="text/javascript">
        var _editor_url  = "/Xinha/";

        var _editor_lang = "en";
    </SCRIPT>
    <!-- Load up the actual editor core -->
    <SCRIPT type="text/javascript" src="/Xinha/XinhaCore.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()
    {
             
      xinha_editors = xinha_editors ? xinha_editors :
      [
        'taTextArea'
      ];
     
     
      xinha_plugins = xinha_plugins ? xinha_plugins :
      [ ];
     
       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","htmlmode","showhelp","about"]
      ];

           
             
       xinha_config.pageStyleSheets = [ _editor_url + "examples/full_example.css" ];

     

      xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);

     
      Xinha.startEditors(xinha_editors);
    }   
    Xinha._addEvent(window,'load', xinha_init);
    </SCRIPT>
    </HEAD>
    <PUBLIC:COMPONENT tagName="EDITOR">
        <PUBLIC:DEFAULTS viewLinkContent tabStop viewMasterTab="false"/>
    </PUBLIC:COMPONENT>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <BODY>
        <textarea id="taTextArea">test</textarea>
    </BODY>
</HTML>

I consume this HTC in HTML file using source

<HTML>
<HEAD>
  <?IMPORT IMPLEMENTATION="/htc/abc.htc"/>
  </HEAD>
  <body>
  <EDITOR id="eneNew">This is test</EDITOR>
</body>
</HTML>

but browsing the HTML file in browser gives error. Error messge is Object doesn't support this action

And after debugging i found it is faliling at the statement

var f=new b(this,c); in the XinhaCore.js

can somebody please help me to resolve the issue?

Offline

#2 2010-08-23 07:34:59

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

Re: Xinha not loading in the HTC files

First your textarea does not have a name.

 <textarea id="taTextArea">test</textarea>

Second you must use the uncompressed Xinha to debug, that error means nothing.


James Sleeman

Offline

#3 2010-08-23 08:42:34

yoyo
New member
Registered: 2010-08-23
Posts: 3

Re: Xinha not loading in the HTC files

Ohh... Sorry

Yes, It should be <textarea name="taTextArea">test</textarea>. But i checked carefully and its usign the "name" attribute with value "taTextArea".

This is the case with not using any plugins, but moment i add the any plugin say "Linker", i get the error
Microsoft JScript runtime error: 'Xinha.getPluginConstructor(...)' is null or not an object.

gogo, i confirmed that same script is working when i try it from the HTML file.

Plese note I am using the IE8 browser.

Offline

#4 2010-08-23 19:09:12

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

Re: Xinha not loading in the HTC files

Are you using the latest version of Xinha?  Have you looked in your browser console to see if there are 404's?


James Sleeman

Offline

#5 2010-08-24 00:38:24

yoyo
New member
Registered: 2010-08-23
Posts: 3

Re: Xinha not loading in the HTC files

I am using the package Xinha 0.96.1. I tried with both  the packages  1) Xinha-0.96.1-Compressed.zip 4.4 MB zip, YUI Compressed Javascript , 2)Xinha-0.96.1.zip  4.5 MB zip (downloaded from http://trac.xinha.org/wiki/DownloadsPage).

Offline

#6 2010-08-24 08:05:03

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

Re: Xinha not loading in the HTC files

Use the uncompressed.
Look in browser console for network errors.


James Sleeman

Offline

Board footer

Powered by FluxBB