Announcement

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

#1 2005-09-28 16:04:29

jmaguilar
New member
Registered: 2005-09-28
Posts: 3

HTMLArea in not defined ERROR

Hi, all
I don't know why this code won't work. Any ideas?

Thanks in advance

---------------------------------------------------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">
    _editor_url  = "http://localhost/matrizdeconocimientos/js/Xinha/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed
    _editor_lang = "en";      // And the language we need to use in the editor.
</script>
<script type="text/javascript" src="http://localhost/matrizdeconocimientos/js/Xinha/htmlarea.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()
    {
      /** 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.
       ************************************************************************/

      xinha_plugins = xinha_plugins ? xinha_plugins :
      [

      ];
             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  smile
             if(!HTMLArea.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 :
      [
        'edicion'       
      ];

      /** 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 HTMLArea.Config();
       *   xinha_config.width  = '640px';
       *   xinha_config.height = '420px';
       *
       *************************************************************************/

       xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();

      /** STEP 4 ***************************************************************
       * We first create editors for the textareas.
       *
       * You can do this in two ways, either
       *
       *   xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
       *
       * if you want all the editor objects to use the same set of plugins, OR;
       *
       *   xinha_editors = HTMLArea.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   = HTMLArea.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.
       ************************************************************************/

      HTMLArea.startEditors(xinha_editors);
    }

    window.onload = xinha_init;
</script>

</head>

<body>
    <form action="guardar_edicion.php" method="post">

                <textarea id="edicion" cols="40" rows="10"><? echo ($contenido); ?></textarea>

        <input type="hidden" name="bloque" value="<? echo($bloque); ?>">
        <input type="submit" value="guardar">       
    </form>

</body>
</html>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Offline

#2 2005-09-29 08:36:56

henke
Xinha Community Member
From: Sweden
Registered: 2005-09-22
Posts: 12

Re: HTMLArea in not defined ERROR

Do you get the same error in both Firefox and IE?

Does the included exampe-file work for you?

Offline

#3 2005-09-29 08:57:22

jmaguilar
New member
Registered: 2005-09-28
Posts: 3

Re: HTMLArea in not defined ERROR

I have not tested this code in IE, only in Firefox. I'll test it as soon as possible.
The included-file doesn't work for me.
It's very strange.

Offline

#4 2005-09-29 09:03:53

henke
Xinha Community Member
From: Sweden
Registered: 2005-09-22
Posts: 12

Re: HTMLArea in not defined ERROR

Weird the example file doesn't work either. Try in IE as well and see if it's the same problem there.

Does the example linked from the xinha-homepage work? I mean this example: http://xinha.gogo.co.nz/xinha-nightly/e … ample.html

Offline

#5 2005-09-29 12:27:40

mokhet
Xinha Authority
From: Paris, France
Registered: 2005-04-03
Posts: 105
Website

Re: HTMLArea in not defined ERROR

Humm, here the full_example is working just fine with FF 1.0.7 win and 1.0.6 linux.

Can you give us the error message you obtain and the user agent you are using ? The full_example is known to be not working with YET with FF 1.5 beta 1. I think it is because of the way plugins are initialized, i suspect the full example trying to go too quick and then failing in FF1.5b1.

Is the full_example is working when you use no plugin at all ?

try to change your _editor_url from "http://localhost/matrizdeconocimientos/js/Xinha/" to

    _editor_url  = "/matrizdeconocimientos/js/Xinha/";

Offline

#6 2005-10-03 11:17:16

jmaguilar
New member
Registered: 2005-09-28
Posts: 3

Re: HTMLArea in not defined ERROR

Thanks for all your responses.
I've tested the code with IE and don't work neither.
At the moment, I'm using the browser Mozilla Firefox 1.0.4. , the change of URL, propose by mokhet, don´t work neither.

Don't worry, that was only a test.

Thanks again.

Offline

Board footer

Powered by FluxBB