Announcement

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

#151 2007-05-04 16:45:37

Bluewolf1983
New member
Registered: 2007-05-04
Posts: 2

Re: Newbie Guide

Hello. I'm having trouble getting the spellchecker to work. The server I am on is primarily ColdFusion, but does allow for execution of PHP code.

To start with, clicking the "spelling icon" leads me to: res://C:\WINDOWS\system32\shdoclc.dll/http_500.htm#http://dev-www.med.emory.edu/Xinha//plugins/SpellChecker/spell-check-logic.php . As the rest of the Xinha code works, I don't think it is in the URL's this guide told me to change.

But even then, it could just be how this server handles another problem. Specifically, going to: http://dev-www.med.emory.edu/Xinha/plug … _setup.php or http://dev-www.med.emory.edu/Xinha/plug … -logic.php produces errors like:

Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/usr/local/share/pear/:/disks/web/maple-dev/virtual/dev-med.emory.edu/) in /disks/web/maple-dev/virtual/dev-med.emory.edu/htdocs/Xinha/plugins/SpellChecker/aspell_setup.php on line 9


So...... anyone here more versed in how this Spell Checker works can tell me what the problem might be? By the error message, I am guessing it has to do with the rights on the server..... but can someone explain what type of rights/permissions would have to be set exactly? Thanks in advance!

Offline

#152 2007-05-10 16:16:39

emmett
New member
Registered: 2007-05-10
Posts: 7

Re: Newbie Guide

I downloaded the latest xinha version and following the newbie guide but I keep getting the error _editor_url is not set.  I believe I have it set correctly.  Any ideas on the problem?

Here is the source:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
  <script type="text/javascript">
                _editor_url = "https://www.banweb.mtu.edu/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="https://www.banweb.mtu.edu/xinha/XinhaCore.js"></script>
            <script type="text/javascript" src="https://www.banweb.mtu.edu/xinha/mtuconfig.js"></script>
</head>
<body>
Testing
<form action="">
<textarea id="edit1" name="edit1" rows="10" cols="50" style="width: 100%">Test</textarea>
</form>
</body>
</html>

Offline

#153 2007-05-11 08:54:07

MyLocalFOCUS.com
Xinha Community Member
Registered: 2007-02-17
Posts: 31

Re: Newbie Guide

Do you have your textarea name in your xinha config file?

You should have a line something like...
xinha_editors = xinha_editors ? xinha_editors : [editor name]; (in this case, your editor name will be edit1)

Offline

#154 2007-05-11 09:11:42

emmett
New member
Registered: 2007-05-10
Posts: 7

Re: Newbie Guide

I have the code below in the config file


xinha_editors = xinha_editors ? xinha_editors :
      [
        'edit1'
      ];

Offline

#155 2007-05-11 09:15:50

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

Re: Newbie Guide

bluewolf: problem is you aure using a crummy windows server, you may need to modify aspell_setup.php to work, and of course you will need a windows version of aspell.


James Sleeman

Offline

#156 2007-05-11 09:15:55

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

Re: Newbie Guide

emmett: are you using firefox, if so check the javascript error console, if not, try it.


James Sleeman

Offline

#157 2007-05-11 11:29:20

emmett
New member
Registered: 2007-05-10
Posts: 7

Re: Newbie Guide

Yes, I am using firefox and IE.  Using the firefox error console I found one syntax error which I have corrected.  Now in firefox I do not receive any errors.  Using IE I receive the following error sequence:

Warning _editor_url is not set!......

Next message:

ERROR [createSelect]:
Can't find the requested dropdown definition

Next Message:

FIXME: Unknown toolbar item: popupeditor

Javascript error for IE:
    line: 1403
    char: 1
    error: 'null' is null or not an object
   code:= 0

Offline

#158 2007-05-11 11:46:50

MyLocalFOCUS.com
Xinha Community Member
Registered: 2007-02-17
Posts: 31

Re: Newbie Guide

emmett

It sounds like you don't have all the modules installed correctly.

Go back to your config js file.

You have the xinha_plugins and xinha_config.toolbar

If you remove all the entries in there...
xinha_plugins leave the context menu
xinha_config.toolbar, leave a seperator

Does the xinha now work?

If so, then start adding the modules back until you find the problem ones.

(This is where I think the error probably lies. I think you are missing some modules, doing this will help to determine which ones.)

Offline

#159 2007-05-11 14:56:40

emmett
New member
Registered: 2007-05-10
Posts: 7

Re: Newbie Guide

This is now what I have in the config file:

xinha_plugins = xinha_plugins ? xinha_plugins : [ ];

I am still receiving the same set of errors plus the additional one below:

Unknown property 'filter'. declaration dropped
.../Xinha.css

The editor is getting partially loaded now.

Offline

#160 2007-05-11 16:08:59

MyLocalFOCUS.com
Xinha Community Member
Registered: 2007-02-17
Posts: 31

Re: Newbie Guide

try it also in the xinha_config.toolbar part of your config file as well.

Then start adding stuff back if that works.

Offline

#161 2007-05-11 16:15:25

emmett
New member
Registered: 2007-05-10
Posts: 7

Re: Newbie Guide

I am not seeing a toolbar section in the config file.  Here is the entire config file I have:

    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 : [ ];
     
             // 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 :
      [
        'edit1'
      ];

      /** 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

Offline

#162 2007-05-11 22:30:04

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

Re: Newbie Guide

You have a permissions problem or missing files (this was shown using LiveHeaders plugin for firefox).

https://www.banweb.mtu.edu/xinha/plugin … -screen.js



GET /xinha/plugins/FullScreen/full-screen.js HTTP/1.1

Host: www.banweb.mtu.edu

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070208 Iceweasel/2.0.0.2 (Debian-2.0.0.2+dfsg-1)

Accept: */*

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive



HTTP/1.x 404 Not Found

Content-Type: text/html; charset=iso-8859-1

Content-Length: 233

Server: Oracle-Application-Server-10g/9.0.4.2.0 Oracle-HTTP-Server OracleAS-Web-Cache-10g/9.0.4.2.0 (N)

Connection: Keep-Alive

Keep-Alive: timeout=5, max=999

Date: Sat, 12 May 2007 02:28:09 GMT


James Sleeman

Offline

#163 2007-05-12 05:45:46

MyLocalFOCUS.com
Xinha Community Member
Registered: 2007-02-17
Posts: 31

Re: Newbie Guide

Hhhmmm....

Where your step 4 remarks are, I have a xinha_config.toolbar section. I am wondering if something missing from here is causing your problems (as I noticed if I removed everything from this section, I had a problem).

My toolbar is...

xinha_config.toolbar =
[
   ["popupeditor"],
   ["separator","formatblock","fontname","fontsize"],
   ["separator","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"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite"]),
   ["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
   ["separator","htmlmode","showhelp"]
];


Put this in (edit most of the bits out so you are left with minimal toolbar) just above
xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);


Hope this helps.

Offline

#164 2007-05-12 21:29:13

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

Re: Newbie Guide

emmett: sorry I put you wrong there, that 404 is the result of a bug in simple_example - FullScreen is no longer a plugin but simple_example was still trying to load it, your config doesn't appear to make that mistake.


James Sleeman

Offline

#165 2007-05-14 12:44:35

emmett
New member
Registered: 2007-05-10
Posts: 7

Re: Newbie Guide

Thanks for everyones help so far.  It appears if I use firefox the editor loads with only one warning:

Warning: Unknown property 'filter'.  Declaration dropped.
Source File: https://www.banweb.mtu.edu/xinha/Xinha.css
Line: 51

However, in IE version 6.0 I still get the same set of errors messages previously received and a partial editor will load. 
errors are as follows:

_editor_url not set...

ERROR [createSelect]:
Can't find the requested dropdown definition

FIXME:Unknown toolbar item: popupeditor

I have added the toolbar section to my config file.

Offline

#166 2007-05-14 13:26:57

MyLocalFOCUS.com
Xinha Community Member
Registered: 2007-02-17
Posts: 31

Re: Newbie Guide

In the toolbar section that you have added, try removing all the lines and add one item back so that it looks like...

xinha_config.toolbar =
[
   ["separator"]
];

If it works then, then start adding some of the other lines back, say for example, the bottom 3 from the example. If that works, fine, add more lines back, if not, then reduce those lines until it works again. Keep doing that until you determine problem lines. One line you have demonstrated a problem with is the popupeditor, so leave that one out for the time being.

I think the _editor_url is probably a reflected error at the moment. (Do you have an _editor_url set in your html? Do you have a page we can have a look at?)

Offline

#167 2007-05-18 14:16:44

emmett
New member
Registered: 2007-05-10
Posts: 7

Re: Newbie Guide

Thanks everyone.  I have the xinha editor working.  My main problem was a missing end tag in my meta tag.

Offline

#168 2007-05-21 18:28:22

Bluewolf1983
New member
Registered: 2007-05-04
Posts: 2

Re: Newbie Guide

gogo wrote:

bluewolf: problem is you aure using a crummy windows server, you may need to modify aspell_setup.php to work, and of course you will need a windows version of aspell.

While we do have Windows servers, the server I am using this on is UNIX.......

Offline

#169 2007-06-18 11:42:35

bratfarrar
New member
Registered: 2007-06-18
Posts: 1

Re: Newbie Guide

Hi there!  I'm having a little bit of a problem with the installation.  When my page first loads, the textarea is in a div that's hidden (style="visibility:hidden;display:none").  I display it later, based on user input.  On Firefox, the textarea appears, but you can't focus on it or enter text.  On IE, the javascript dies (IE doesn't seem to initialize objects fully until they're visible).

So... I've delayed the call to Xinha.startEditors() until I make the textarea visible.  Which seems to work on Mozilla, but not on IE.  (I get a JavaScript error: "Object doesn't support this action").  The other problem is that I'm not sure how I would initialize different textareas on the page at different times, using this method.

Any thoughts?

-daniel

p.s. Thanks for creating this great resource!

Offline

#170 2007-07-24 10:59:20

hermes
New member
Registered: 2007-07-23
Posts: 6

Re: Newbie Guide

Hello All:

I was trying to load a 'skin' and wasn't able to until I stumbled on some posts referring to the '_editor_skin' variable. Nowhere in the newbie guide or the 'list of available options' is this variable mentioned! Only after setting the variable was I able to load a skin.

I would think that this is something worthy of putting into the newbie guide...

Offline

#171 2007-07-25 12:16:12

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

Re: Newbie Guide

You are right, thank you. I updated the NewbieGuide accordingly

Offline

#172 2007-07-30 16:02:43

miguelbarragan
New member
Registered: 2007-07-30
Posts: 1

Re: Newbie Guide

Hi:

I'm using Visual Studio 2005 and develop applications in C# can Xinha be integrated into ASP.NET?

Offline

#173 2007-08-21 09:28:53

apziro
New member
Registered: 2007-08-21
Posts: 1

Re: Newbie Guide

Hi,
I've installed Xinha, got the editor displayed nice and easy, but... I need to use it on a page where I already have another javascript that needs to intercept and manipulate the content of the textarea, as created by Xinha, before submitting. This doesn't seem to be possible, as it appears the content from the Xinha editor is not actually inserted into the textarea untill the form is submitted.
Am I missing something, is there a function included that I can call to extract the html on demand rather than on submit, or am  just out of luck?
I have an html form looking like this:

<form name="postform" [...] onSubmit="return DoPost()">
  <textarea id="html_field" name="html_field"[...]>
    [...]
  </textarea>
</form>

The DoPost looks something like:

function DoPost() {
  var x=html_field.value  // at this point, x must be made to hold the Xinha output, but html_field.value is null
  [...]
  document.postform.submit();
  return true;
}

Any help?

Offline

#174 2007-09-05 09:34:55

Mr P!nk
New member
Registered: 2007-09-05
Posts: 5

Re: Newbie Guide

Hi.
I've installed Xinha to my server and everything works fine amazing software A++

but is there a way i can modify it so when links are entered it enters them as <a href=www.somwhere.co.uk>link</a> instead of
<a href="www.somwhere.co.uk">link</a> 


im not to close to .js so im a bit uncertain as to what to edit and what to leave alone

cheers in advance =]

Last edited by Mr P!nk (2007-09-05 12:49:17)

Offline

#175 2007-09-06 06:06:01

Gil
New member
Registered: 2007-09-06
Posts: 3

Re: Newbie Guide

Ahoy!

I'm quite the greenhorn as far as all kinds of coding are concerned, proven again by how I failed to correctly install Xinha.
Just for quick reference, could someone give me a finished .html with the different xinha-related codes and how they're supposed to be stuck in cleary visible? I couldn't really manage to do it correctly only from the newbie guide, so seeing a finished one might be rather helpful.

Thanks for help.

Offline

Board footer

Powered by FluxBB