Announcement

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

#1 2007-10-27 11:48:31

Neochamber
New member
Registered: 2007-10-27
Posts: 5

No Editor visible please help me...

Hi Guys,

I made the newbie-tutorial but no editor opens. I searched in this forum, but no sulotion fit my problem.
Please look at my source and give me any hints, thanks.

HTML:

<html>
  <head>
  <title>Editortest</title>
 
  <script type="text/javascript">
    _editor_url  = "/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="/xinha/my_config.js"></script>
  <script type="text/javascript" src="/xinha/XinhaCore.js"></script>
  </head>
  <body>
  <form action="">
    <textarea id="eingabe" name="eingabe" cols="90" rows="10"></textarea>
  </form>
  </body>
</html>


my_config.js:

<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.
       *
       * The list of plugins below is a good starting point, but if you prefer
       * a must simpler editor to start with then you can use the following
       *
       * xinha_plugins = xinha_plugins ? xinha_plugins : [ ];
       *
       * which will load no extra plugins at all.
       ************************************************************************/

      xinha_plugins = xinha_plugins ? xinha_plugins :
      [
       'CharacterMap',
       'ContextMenu',
       'ListType',
       'SpellChecker',
       'Stylist',
       'SuperClean',
       'TableOperations'
      ];
             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  smile
             if(!Xinha.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 :
      [
        'eingabe'
      ];

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

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

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

      Xinha.startEditors(xinha_editors);
    }

    Xinha._addEvent(window,'load', xinha_init); // this executes the xinha_init function on page load
                                                // and does not interfere with window.onload properties set by other scripts
  </script>

Thanks, Neochamber.

Offline

#2 2007-10-29 19:15:40

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: No Editor visible please help me...

you have to load XinhaCore.js before my_config.js

Offline

#3 2007-10-30 16:58:55

Neochamber
New member
Registered: 2007-10-27
Posts: 5

Re: No Editor visible please help me...

So swaped the entries in html-file

HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title>Editortest</title>

  <script type="text/javascript">
    _editor_url  = "http://192.168.0.4/editor/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="/xinha/XinhaCore.js"></script>
  <script type="text/javascript" src="/xinha/my_config.js"></script>
 
 
  </head>
  <body>
  <form action="">
    <textarea id="eingabe" name="eingabe" cols="90" rows="10"></textarea>
  </form>
  </body>
</html>


But nothing happens. :-(

Offline

#4 2007-11-02 13:46:09

Neochamber
New member
Registered: 2007-10-27
Posts: 5

Re: No Editor visible please help me...

Here are more details formy problem:
- Browser Firefox at a Windows Vista


This is the result of the failure analysis with firefox:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIWebNavigation.loadURI]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://global/content/viewSource.js :: viewSource :: line 141"  data: no]

Has anybody an idea?

Offline

#5 2007-11-02 14:05:59

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: No Editor visible please help me...

You don't need the script tags (<script type="text/javascript"></script>) inside the .js file
This exception has nothing to do with Xinha; I don't know if it's the source of your problem, but I doubt it.
If your problem persists, I would ask you to put your stuff on a server, than one can see it in action. It's hard to see problems just by looking at the code

Offline

#6 2007-11-04 13:48:01

Neochamber
New member
Registered: 2007-10-27
Posts: 5

Re: No Editor visible please help me...

Here is my stuff on a server:

http://christianroth.com/editor/

Offline

#7 2007-11-05 05:27:49

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: No Editor visible please help me...

You have not set the right paths
It should be /editor/xinha/XinhaCore.js instead of /xinha/XinhaCore.js and also _editor_url  = "/editor/xinha/"

Offline

#8 2007-11-05 14:42:35

Neochamber
New member
Registered: 2007-10-27
Posts: 5

Re: No Editor visible please help me...

ray thank you very much, that was the reason. :-)

Offline

Board footer

Powered by FluxBB