Announcement

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#1 2005-03-10 09:01:40

akaEdge
Xinha Community Member
From: London
Registered: 2005-03-05
Posts: 16

Newbie Guide

There is now a Newbie Guide available at http://xinha.python-hosting.com/wiki/NewbieGuide

I expect this will just be a forerunner to more detailed documentation for Xinha users that will be made on other pages, but this guide is simply aimed at getting new users started as quickly as possible.

If you run in to any problems using the Newbie Guide please post them here and I will do my best to make sure they are resolved and the guide is updated.

Last edited by akaEdge (2005-07-24 13:29:18)


akaEdge

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#2 2005-03-21 09:07:22

RwD
New member
Registered: 2005-03-21
Posts: 3

Re: Newbie Guide

This is in the Newbie Guide:

      /** STEP 3 ***************************************************************
       * 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.
       ************************************************************************/

However, "registerPlugins" is not a function existing anywhere in the code at all.

I created this function to make a functional registerPlugins function that I put somewhere in the htmlarea.js:
    HTMLArea.prototype.registerPlugins = function(plugin_names)
    {
      if(plugin_names)
      {
        for(var i = 0; i < plugin_names.length; i++)
        {
          this.registerPlugin(eval(plugin_names[i]));
        }
      }
    }

What I basically did was copy the code from the makeeditors function and add it in the new HTMLArea method called registerPlugins.

Offline

#3 2005-03-21 09:39:27

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

Re: Newbie Guide

Can you submit that as a ticket please ("New Ticket" at the top of the page).  Thanks.


James Sleeman

Offline

#4 2005-03-22 18:31:08

mackstann
New member
Registered: 2005-03-22
Posts: 2

Re: Newbie Guide

I've followed the directions, but xinha's not working.  In the javascript console I get "Error: textarea has no properties" on line 972 of htmlarea.js.  The id attribute of my textarea matches, but still all I see is a normal textarea.

edit: doh, go figure, I solved it RIGHT after posting.  The page I wanted to use it on had another body onload=".." which was preventing xinha_init from running.  (I think the error message was from the previous page)

Last edited by mackstann (2005-03-22 18:38:01)

Offline

#5 2005-03-26 11:47:41

kram
Xinha Community Member
Registered: 2005-03-26
Posts: 21

Re: Newbie Guide

Only used htmlarea for about 4 hours and then switched to xinla so I'm new to this ...

I've been trying to integrate with Lotus Domino. Apart from a few things working well - so a big thank you to the developers! big_smile

At the end of the my_config,js file there's this line

window.onload = xinha_init;

How does this relate to the onload

initEditor();

command that I used with htmlarea?

----

The few things that aren't working yet...

1. copy, cut, paste icons aren't appearing
2. table properties not working in IE ( Line 748, invalid argument setting background color )
and Firefox switches back to the main window when a colour is selected so you have to navigate back to the properties window to click OK,
3. can't get "Enlarge Editor" to work.
4. Not discovered a use for the "Toggle Borders" icon

I suspect I'm not initiliasing properly.

Offline

#6 2005-03-26 19:28:20

kram
Xinha Community Member
Registered: 2005-03-26
Posts: 21

Re: Newbie Guide

Yup. I've got this code in the head of a page

<script type="text/javascript">
_editor_url = '/xinha/';
_editor_lang = 'en';
</script>
<script type="text/javascript" src="/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/xinha/my_config.js"></script>

but nothing in my_config.js seems to have any effect & the editor isn't loaded if the following code isn't also in the page header below the above,

HTMLArea.loadPlugin("TableOperations");
HTMLArea.loadPlugin("ListType");
HTMLArea.loadPlugin("ContextMenu");

var editor = null;
function initEditor() {
editor = new HTMLArea("Body");
editor.registerPlugin(TableOperations);
editor.registerPlugin(ListType);
editor.registerPlugin(ContextMenu);
editor.generate();
return false;
}

...

<body text="#000000" bgcolor="#FFFFFF" topmargin=0 marginheight=0  onload="initEditor();">

There's no mistake with the my_config.js filename & its xinha_editors field ID name is correct ... please, any suggestions?

mark

Offline

#7 2005-03-27 19:29:16

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: Newbie Guide

If you've followed the newbie guide then you need to change the onload="initEditor()" in the body tag for onload="xinha_init();"

You can then get rid of the old HTMLArea stuff.

Offline

#8 2005-03-28 18:14:54

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: Newbie Guide

The newbie guide explains what the content of my_config.js should be, which includes the xinha_init function. Are you editing section 2 of the my_config.js to include the name(s) of your textarea(s)?:

xinha_editors = xinha_editors ? xinha_editors :
      [
        'myTextArea',
        'anotherOne'
      ];

In the above, each array item should be the ID of each textarea you want to use Xinha. When you then add the onload="xinha_init()" to your body tag, it'll create Xinha editors for each textarea you specified in the xinha_editors array above.

Offline

#9 2005-03-28 18:29:38

kram
Xinha Community Member
Registered: 2005-03-26
Posts: 21

Re: Newbie Guide

Sorry - just deleted my post before seeing your reply.

Yes the area is named correctly. According to the Firefox JS console the reason the config file isn't working is this error

---- Error: HTMLArea.loadPlugins is not a function

at this line
              if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;

This is in the HEAD of the page

<script type="text/javascript">
_editor_url = '/xinha/';
_editor_lang = 'en';
</script>
<script type="text/javascript" src="/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/xinha/config.js"></script>

It works if instead of the config file and I use this (and similar) later on in HEAD
HTMLArea.loadPlugin("ContextMenu");
etc.

Its bound to be something simple but I can't see it. roll

Offline

#10 2005-03-29 03:36:27

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: Newbie Guide

Ah, OK. You need to download the Xinha-nightly package instead of the Xinha-latest one. The functions for importing multuple plugins, etc. at once were added after the last 'stable' release, although the nightly is pretty stable as well.

Offline

#11 2005-03-29 15:29:53

kram
Xinha Community Member
Registered: 2005-03-26
Posts: 21

Re: Newbie Guide

That's it. big_smile

Everything working now I think. Fullscreen, list options and some minor problems with table backgrounds. All working with the config file as described in the newbie guide.

I'd get rid of that so-called stable download if I was you hmm I've wasted lots of time with it - but I have learned a bit too, so not a total waste.

Thanks very much for your help. And for xinha!

Offline

#12 2005-03-30 03:51:27

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: Newbie Guide

No problem, though it's not me that writes Xinha - you have gogo to thank for that wink

Offline

#13 2005-03-30 15:32:52

rharrelson
New member
Registered: 2005-03-30
Posts: 1

Re: Newbie Guide

This is perhaps obvious to most here, but was not to me. I've just installed Xinha by following the quick start guide and was getting nothing but the plain text area. The reason was this:

I chose the option of putting the config info into /xinha/my_config.js, and I did this by copying and pasting the code from the quick start guide. In so doing I copied the <script type="text/javascript"> and </script> from the top and bottom of the config info, which generated an error, as it wound up embedded within the   

<script type="text/javascript" src="/xinha/my_config.js"></script>

that is included in the page with the textarea, meaning I had a <script> tag within another <script> tag.

Now that I've fixed that, it seems to load fine.

Robert

Offline

#14 2005-04-06 11:00:31

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

Doubt this it the correct place for this question but since I'm a xinha newb it seemed appropriate.  I've been using the old HTMLArea for a couple of years, on my website to make it easy to edit pages, duh right?  smile

Any hoot, found xinha and thought I give it a roll.  All seemed easy enough, except that while it appears to load around my textarea, I get a js error:

Line: 3847
Char: 5
Error: Unspecified error.
Code: 0
Url: http://theurl

Can anyone give me some clues as to what might actually be wrong?

Thanks,
con4mity

Offline

#15 2005-04-06 12:12:21

akaEdge
Xinha Community Member
From: London
Registered: 2005-03-05
Posts: 16

Re: Newbie Guide

did you follow the NewbieGuide or did you install over the top of your existing htmlarea installation?

If you did follow the Newbie Guide and you used the new files, then did you download the latest stable release or the nightly release? I ask this because the latest nightly is one you should use NOT the latest stable (it says this in the guide - and as soon as the stable works it will be changed to recommend the stable release).

If you did get the nightly and you have used the latest files - have you used the recommended functions to initiate the text area box on your page, or have you used old htmlarea ones?

Do you use any old custom config options from the old htmlarea in any other included files?

If none of the above is true, then post back


akaEdge

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#16 2005-04-06 13:11:26

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

Hey man thanks for the response.  I followed the newbie guide almost to the "T" the exception being my area is called mybody;

      xinha_editors = xinha_editors ? xinha_editors :
      [
        'mybody',
      ];

I'm using the nightly version, it's a whole new page that I created from the newbie guide and doesn't have any old stuff on it.

I'm loading modules as prescribed in the newbie guide, and they seem to work.  I get the error, after xinha loads, but it appears to actually look correct, though it's obviously not completely working.

I looked in the htmlarea.js in the 3847 line area, but it seems to be a prototype for IE function and I doubt that's related.

My textarea is in a php page, don't know if that relates, and I fill the area from a mysql database, but that all seems to work okay.  So.. I'm not sure what is going on.  I get the same problem when I just load an empyt xinha area.

Thanks,
Corey

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#17 2005-04-07 04:44:00

akaEdge
Xinha Community Member
From: London
Registered: 2005-03-05
Posts: 16

Re: Newbie Guide

Well the first thing I noticed straight up was:

      xinha_editors = xinha_editors ? xinha_editors :
      [
        'mybody',
      ];

there should NOT be a comma after 'mybody' as that means there should be another element - which would cause an error like you describe - It loads the first one then has a problem loading the second one that doesnt exist. Try just:

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

I will make the newbie guide a little clearer on that point (it is in there already though)


akaEdge

Offline

#18 2005-04-07 07:06:09

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

Re: Newbie Guide

PHP and it's ignored trailing commas have much to answer for in the world of Javascript bug hunting smile

I think I will add a "boilerplate" file to the examples directory which people can more easily modify to be thier own (currently they have to copy the example body and delete a chunk of stuff from the bottom).


James Sleeman

Offline

#19 2005-04-07 07:15:05

akaEdge
Xinha Community Member
From: London
Registered: 2005-03-05
Posts: 16

Re: Newbie Guide

ah well - I don't program PHP - M$ all the way for me unfortunately! (well fortunate in that I always look for trailing commas)

I think a very simple page in the examples would be handy - maybe even called "newbie_example" that is just the code as it should be after someone has gone through the guide. It just so happens I have this file ;-) I will email it through.

I have it set up, so that I can keep downloading the stable release and the nightly ones - waiting until the stable version is brought up to the working level of the nightly - there is no real point of the current stable as it doesn't work with the newbie guide.

(... I know - you want a ticket... *sigh*)


akaEdge

Offline

#20 2005-04-08 11:18:46

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

I didn't notice that comma, but removing it didn't clarify my problem any further.  I'm waiting for you newbie file I guess maybe there's something else I did wrong.  What's odd is the system works, I just get that stupid error anyway.

Offline

#21 2005-04-10 08:00:14

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

Okay, I'm on to something here.  I think, somehow the error is related to using the page inside a frame, but I'm not sure what is causing it.  When I load the page directly, no error, when I call it in a frame, I get the error.

Can anyone help me with this, it's really dumb.

Offline

#22 2005-04-10 08:40:51

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

And one other question, sorry, where is the background color defined for text area.  I've tried just adding background="#000000" and also with a CSS, but it shows up white.  Is it in one of the scripts elsewhere?

Thanks,
corey

Offline

#23 2005-04-11 03:09:38

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Newbie Guide

you need to define the background-color as pageStyle, eg:
editor.config.pageStyle = "body { background-color: red; } ";
(additional to your other pageSTyle-rules)

this defines the CSS-styles used for the Xinha-IFrame


Niko

Offline

#24 2005-04-13 09:58:40

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

Where do I find pagestyle-rules?

Where are they defined?

Sorry I'm new.

I looked but pagestyle doesn't show up except for as a variable in htmlarea.js

Is this something that goes in the CSS, or myconfig.js

I found .htmlarea iframe class in the defualt htmlarea.css but this doesn't seem like what you mean, or you would have said that right?

Thanks for your assistance.

Offline

#25 2005-04-13 10:25:29

guillaumed
Xinha Administrator
From: Lyon, France
Registered: 2005-02-23
Posts: 85

Re: Newbie Guide

I'm also interested for such documentation..

Offline

Board footer

Powered by FluxBB