Opened 9 years ago

Closed 9 years ago

#1539 closed defect (invalid)

Using Xinha in the HTC components

Reported by: guest Owned by: gogo
Priority: normal Milestone: 0.97
Component: Xinha Core Version: trunk
Severity: normal Keywords: Xinha, HTC Component
Cc:

Description (last modified by gogo)

Hi,

I want Xinha to be loaded from HTC component's script. Below is the source from HTC file

<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?

Change History (2)

comment:1 Changed 9 years ago by gogo

  • Description modified (diff)

comment:2 Changed 9 years ago by gogo

  • Resolution set to invalid
  • Status changed from new to closed

This is a bug tracker not a forum. Go ask in forum. Also, do not ask about the compressed files, nobody can help you with compressed files, use the uncompressed files to debug, not compressed ones.

Note: See TracTickets for help on using tickets.