Announcement

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

#126 2006-06-20 07:02:02

WebPhil
New member
Registered: 2006-06-20
Posts: 4

Re: Newbie Guide

Has anyone else found that at times (when you have a full HTML page to be put in Xinha) that in FireFox it never loads the page and keeps "swirling" (the "I'm loading" circle thing).

I'm trying to hammer down exactly what's causing it, but it doesn't happen all of the time, only on some layouts that people have supplied me.

I know about the "incorrectly formatted HTML" issue, where the editor loads up empty if your HTML isn't formatted properly, like <table><form><tr> rather than <form><table><tr>, so I'm running the code through various validators to see if there's a real problem in it, but it just doesn't seem like it at first glance.

When it happens, the editors with very little or no HTML content in them work, it's just the ones which aren't displaying get "stuck".

Any suggestions on what other oddities I should be looking for?

Thanks in advance.


EDIT: Just so you know, I have the FullPage plugin activated so it should handle the <HEAD> part of the HTML properly

Last edited by WebPhil (2006-06-20 07:40:11)

Offline

#127 2006-08-16 12:25:40

drizz815
New member
Registered: 2006-08-16
Posts: 1

Re: Newbie Guide

Hi, I'd like to be able to use Xinha but I can't get it started.  I downloaded it on 2006-08-16.  I can get the local simple_example to work in the examples folder.  I think I've been through the Newbie instructions very carefully (several times), but I can't get my test page to work (test page kept very simple).  I've tried copying the simple_example and playing around with that.  It works in the examples folder but I can't get it work anywhere else (I've tried no end of _editor_url versions) so I thought I'd try it in it's original location and delete the second textarea (and the reference to the second ta, and the comma) - no luck.  I'm using Windows and IIS.  The original simple_example works both via http://localhost and from the file system.  I'm using FireFox but get matching behaviour in IE6.

I don't get any JavaScript errors.

Any help would be much appreciated.

Last edited by drizz815 (2006-08-16 13:17:23)

Offline

#128 2007-02-07 03:24:41

AussieFreelancer
Xinha Community Member
From: Waroona, WA, Australia
Registered: 2007-02-07
Posts: 22

Re: Newbie Guide

Hi All,

A very newbie here... I have just tried to install xinha today on a site I am developing for a client. I had nearly finished the site when I realised that the RTE I was using was pretty crap. So I looked for a better one, and found this.

I followed the newbie guide, and I have put the my_config code into the head section, as it is included from page to page so it is no big deal, but also, I am using a js function which deals with multiple onload functions... I am hoping it is not this that is causing the issues, because it is incredibly useful and I am using a dropdown that requires some js to make it work in ie, and need that to keep working!

That said, I installed as per the newbie guide, and I have absolutely nothing except a big white textarea. The forms are in a member only area, so unfortunately, providing a link will not be of much use, but the following is the source code of the page, I hope it is ok for me to post it:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <!-- Metadata Package -->
    <meta name="beginpackage" content="Mandurah Offshore Fishing and Sailing Club"></meta>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
    <meta name="name" content="Mandurah Offshore Fishing and Sailing Club"></meta>
    <meta name="author" content="Aussie Freelancer"></meta>
    <meta name="keywords" content="mandurah, offshore, fishing, sailing, club"></meta>
    <meta name="description" content=""></meta>

    <meta name="distribution" content="global"></meta>
    <meta name="coverage" content="worldwide"></meta>
    <meta name="endpackage" content="Mandurah Offshore Fishing and Sailing Club"></meta>
    <!-- End of Metadata Package -->

    <!-- Website Title -->
    <title>Mandurah Offshore Fishing and Sailing Club</title>
    
    <!-- stylesheets -->
    <link rel="stylesheet" type="text/css" media="screen, projection" href="http://www.mofsc.com.au/index.php/styles/standard_css/" ></link>

    <!-- eof stylesheets -->
    
    <!-- scripts -->

        <script type="text/javascript">
        _editor_url  = "http://www.mofsc.com.au/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://www.mofsc.com.au/xinha/XinhaCore.js"></script>

        <!-- WOM -->
        <script language="JavaScript" type="text/javascript">
        /*************************************************************
        * Window Onload Manager (WOM) v1.0
        * Author: Justin Barlow - www.netlobo.com
        *
        * Description:
        * The WOM library of functions allows you to easily call
        * multiple javascript functions when your page loads.
        *
        * Usage:
        * Add functions to WOM using the womAdd() function. Pass the
        * name of your functions (with or without parameters) into
        * womAdd(). Then call womOn() like this:
        *     womAdd('hideDiv()');
        *     womAdd('changeBg("menuopts","#CCCCCC")');
        *     womOn();
        * WOM will now run when your page loads and run all of the
        * functions you have added using womAdd()
        *************************************************************/
        /*************************************************************
        * The womOn() function will set the window.onload function to
        * be womGo() which will run all of your window.onload
        * functions.
        *************************************************************/
        function womOn(){
          window.onload = womGo;
        }
        /*************************************************************
        * The womGo() function loops through the woms array and
        * runs each function in the array.
        *************************************************************/
        function womGo(){
          for(var i = 0;i < woms.length;i++)
            eval(woms[i]);
        }
        /*************************************************************
        * The womAdd() function will add another function to the woms
        * array to be run when the page loads.
        *************************************************************/
        function womAdd(func){
          woms[woms.length] = func;
        }
        /*************************************************************
        * The woms array holds all of the functions you wish to run
        * when the page loads.
        *************************************************************/
        var woms = new Array();
        </script>

        <!-- eof WOM -->
        
        <!-- suckerfish -->
        <script language="javascript" type="text/javascript">
            startList = function() 
            {
                if (document.all&&document.getElementById) 
                {
                    navRoot = document.getElementById("nav");
                    for (i=0; i<navRoot.childNodes.length; i++) 
                    {
                        node = navRoot.childNodes[i];
                        if (node.nodeName=="LI") 
                        {
                            node.onmouseover=function() 
                            {
                                this.className+=" over";
                            }
                            node.onmouseout=function() 
                            {
                                this.className=this.className.replace(" over", "");
                            }
                        }
                    }
                }
            }
            womAdd('startList()');
            womOn();
        </script>
        <!-- eof suckerfish -->
        
        <!-- rte -->
        <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',
        'FullScreen',
        'ListType',
        'SpellChecker',
        'Stylist',
        'SuperClean',
        'TableOperations'
        ];
             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
             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 :
        [
        'field_id_5',
        'field_id_7'
        ];

        /** 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);
        }

        womAdd('xinha_init');
        womOn();
        
        </script>
        <!-- eof rte -->

        <!-- toggleLayer -->
        <script language="JavaScript">
            function toggleLayer(whichLayer)
            {
                if (document.getElementById)
                {
                    // this is the way the standards work
                    var style2 = document.getElementById(whichLayer).style;
                    style2.display = style2.display? "":"block";
                }
                else if (document.all)
                {
                    // this is the way old msie versions work
                    var style2 = document.all[whichLayer].style;
                    style2.display = style2.display? "":"block";
                }
                else if (document.layers)
                {
                    // this is the way nn4 works
                    var style2 = document.layers[whichLayer].style;
                    style2.display = style2.display? "":"block";
                }
            }
        </script>
        <!-- eof toggleLayer -->
    
    <!-- eof scripts -->
    
</head>

<body>

<!-- container -->
<div id="wrapper">

<!-- intro and header -->
<div id="intro" title="Mandurah Offshore Fishing and Sailing Club">
    <div id="header">
        
        <!-- skip links -->

        <div id="skip">
            <ul>
                <li><a href="#nav" title="skip to navigation" target="_self" accesskey="1" tabindex="1">skip to navigation</a></li>
                <li><a href="#main" title="skip to content" target="_self" accesskey="2" tabindex="2">skip to content</a></li>

            </ul>
        </div>

        
        <!-- page title and logo -->
        <h1><a href="http://www.mofsc.com.au/index.php/main/" title="Mandurah Offshore Fishing and Sailing Club" target="_self">mofsc</a></h1>
        <div class="logo">
            <img src="http://www.mofsc.com.au/images/uploads/MOFSClogo.jpg" alt="MOFSC Logo" />
        </div>
        
        <!-- random news -->

        <div id="random_news">
        
                        
            <p><strong>Latest Dinghy News & Events</strong></p>
            
            
                    <p>There are no news and events at this time.</p>
                
        
        </div>
        <!-- eof random news -->
        
        <!-- admin login -->
                
                <div class="admin_tools">

            <p>
                <a href="http://www.mofsc.com.au/index.php/member/profile/" title="My Profile" target="_self">My Profile</a> | 
                <a href="http://www.mofsc.com.au/index.php?ACT=10" title="Log Out" target="_self">Log Out</a>
            </p>
        </div>
                <!-- eof admin login -->
        
    </div>
</div>

<!-- eof intro and header -->

    <a name="main"></a>
    <div id="main">
    
        <div id="rotating_images">
            
                <img src="http://www.mofsc.com.au/images/uploads/mofscboat.jpg" alt="image" width="284" height="419" />
            <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
         xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
    rdf:about="http://www.mofsc.com.au/index.php/rotating_images/"
    trackback:ping="http://www.mofsc.com.au/index.php/trackback/4/"
    dc:title="Rotating Images"
    dc:identifier="http://www.mofsc.com.au/index.php/rotating_images/" 
    dc:subject=""
    dc:description="&lt;img src="http://www.mofsc.com.au/images/uploads/mofscboat.jpg" alt="image" width="284" height="419" /&gt;"
    dc:creator="Aussie Freelancer"
    dc:date="2007-02-01 03:38:00 AM GMT" />
</rdf:RDF>
-->
        </div>
            
        <div class="entry">
            <h1>Add Entry</h1>

        </div>
        
        <div id="entry_form">
            <form id='entryform' name='entryform' method="post" action="http://www.mofsc.com.au/index.php/main/add/club_news/club/news/"  >
<div>
<input type="hidden" name="ACT" value="18" />
<input type="hidden" name="RET" value="http://www.mofsc.com.au/index.php/main/add/club_news/club/news/" />
<input type="hidden" name="PRV" value="main/club/news" />
<input type="hidden" name="URI" value="/main/add/club_news/club/news/" />
<input type="hidden" name="XID" value="35649835d569adc6204ceb068e1cec8857aba412" />
<input type="hidden" name="return_url" value="main/club/news" />
<input type="hidden" name="author_id" value="1" />
<input type="hidden" name="weblog_id" value="3" />
<input type="hidden" name="field_ft_4" value="none" />
<input type="hidden" name="field_ft_5" value="xhtml" />

</div>

        <script type="text/javascript"> 
        <!--
        function liveUrlTitle()
        {
            var defaultTitle = '';
            var NewText = document.getElementById("title").value;
            
            if (defaultTitle != '')
            {
                if (NewText.substr(0, defaultTitle.length) == defaultTitle)
                {
                    NewText = NewText.substr(defaultTitle.length)
                }    
            }
            
            NewText = NewText.toLowerCase();
            var separator = "_";
            
            if (separator != "_")
            {
                NewText = NewText.replace(/\_/g, separator);
            }
            else
            {
                NewText = NewText.replace(/\-/g, separator);
            }
    
            // Foreign Character Attempt
            
            var NewTextTemp = '';
            for(var pos=0; pos<NewText.length; pos++)
            {
                var c = NewText.charCodeAt(pos);
                
                if (c >= 32 && c < 128)
                {
                    NewTextTemp += NewText.charAt(pos);
                }
                else
                {
                    if (c == '223') {NewTextTemp += 'ss'; continue;}
                if (c == '224') {NewTextTemp += 'a'; continue;}
                if (c == '225') {NewTextTemp += 'a'; continue;}
                if (c == '226') {NewTextTemp += 'a'; continue;}
                if (c == '229') {NewTextTemp += 'a'; continue;}
                if (c == '227') {NewTextTemp += 'ae'; continue;}
                if (c == '230') {NewTextTemp += 'ae'; continue;}
                if (c == '228') {NewTextTemp += 'ae'; continue;}
                if (c == '231') {NewTextTemp += 'c'; continue;}
                if (c == '232') {NewTextTemp += 'e'; continue;}
                if (c == '233') {NewTextTemp += 'e'; continue;}
                if (c == '234') {NewTextTemp += 'e'; continue;}
                if (c == '235') {NewTextTemp += 'e'; continue;}
                if (c == '236') {NewTextTemp += 'i'; continue;}
                if (c == '237') {NewTextTemp += 'i'; continue;}
                if (c == '238') {NewTextTemp += 'i'; continue;}
                if (c == '239') {NewTextTemp += 'i'; continue;}
                if (c == '241') {NewTextTemp += 'n'; continue;}
                if (c == '242') {NewTextTemp += 'o'; continue;}
                if (c == '243') {NewTextTemp += 'o'; continue;}
                if (c == '244') {NewTextTemp += 'o'; continue;}
                if (c == '245') {NewTextTemp += 'o'; continue;}
                if (c == '246') {NewTextTemp += 'oe'; continue;}
                if (c == '249') {NewTextTemp += 'u'; continue;}
                if (c == '250') {NewTextTemp += 'u'; continue;}
                if (c == '251') {NewTextTemp += 'u'; continue;}
                if (c == '252') {NewTextTemp += 'ue'; continue;}
                if (c == '255') {NewTextTemp += 'y'; continue;}
                if (c == '257') {NewTextTemp += 'aa'; continue;}
                if (c == '269') {NewTextTemp += 'ch'; continue;}
                if (c == '275') {NewTextTemp += 'ee'; continue;}
                if (c == '291') {NewTextTemp += 'gj'; continue;}
                if (c == '299') {NewTextTemp += 'ii'; continue;}
                if (c == '311') {NewTextTemp += 'kj'; continue;}
                if (c == '316') {NewTextTemp += 'lj'; continue;}
                if (c == '326') {NewTextTemp += 'nj'; continue;}
                if (c == '353') {NewTextTemp += 'sh'; continue;}
                if (c == '363') {NewTextTemp += 'uu'; continue;}
                if (c == '382') {NewTextTemp += 'zh'; continue;}
                if (c == '256') {NewTextTemp += 'aa'; continue;}
                if (c == '268') {NewTextTemp += 'ch'; continue;}
                if (c == '274') {NewTextTemp += 'ee'; continue;}
                if (c == '290') {NewTextTemp += 'gj'; continue;}
                if (c == '298') {NewTextTemp += 'ii'; continue;}
                if (c == '310') {NewTextTemp += 'kj'; continue;}
                if (c == '315') {NewTextTemp += 'lj'; continue;}
                if (c == '325') {NewTextTemp += 'nj'; continue;}
                if (c == '352') {NewTextTemp += 'sh'; continue;}
                if (c == '362') {NewTextTemp += 'uu'; continue;}
                if (c == '381') {NewTextTemp += 'zh'; continue;}
                
                }
            }
    
            NewText = NewTextTemp;
            
            NewText = NewText.replace('/<(.*?)>/g', '');
            NewText = NewText.replace('/\&#\d+\;/g', '');
            NewText = NewText.replace('/\&\#\d+?\;/g', '');
            NewText = NewText.replace('/\&\S+?\;/g','');
            NewText = NewText.replace(/['\"\?\.\!*$\#@%;:,=\(\)\[\]]/g,'');
            NewText = NewText.replace(/\s+/g, separator);
            NewText = NewText.replace(/\//g, separator);
            NewText = NewText.replace(/[^a-z0-9-_]/g,'');
            NewText = NewText.replace(/\+/g, separator);
            NewText = NewText.replace(/[-_]+/g, separator);
            NewText = NewText.replace(/\&/g,'');
            NewText = NewText.replace(/-$/g,'');
            NewText = NewText.replace(/_$/g,'');
            NewText = NewText.replace(/^_/g,'');
            NewText = NewText.replace(/^-/g,'');
            
            if (document.getElementById("url_title"))
            {
                document.getElementById("url_title").value = "" + NewText;            
            }
            else
            {
                document.forms['entryform'].elements['url_title'].value = "" + NewText; 
            }        
        }


        function showhide_item(id)
        {
            if (document.getElementById(id).style.display == "block")
            {
                document.getElementById(id).style.display = "none";
            }
            else
            {
                document.getElementById(id).style.display = "block";
            }
        }
        
        
        -->
        </script>

            <input type="hidden" name="title" id="title" value="club_news_20070207155559" maxlength="100" class="wide" />

            <input type="hidden" name="url_title" id='url_title' value="club_news_20070207155559" maxlength="75" class="wide" />

            <p><a href="http://www.mofsc.com.au/systemcp/index.php?S=343b6d2152d6c314f91e650793bf7545850c4dcf&C=publish&M=file_upload_form&field_group=1&Z=1" onclick="window.open(this.href, '_blank', 'width=400,height=600');return false;" onkeypress="this.onclick()">File Upload</a></p>

            <p>* Entry Title<br />

            

            
            <input type="text" dir="ltr" name="field_id_4" value="" maxlength="128" size="50" class="wide" /></p>
            

            

            

            <p>* Entry Content<br />

            
            <textarea name="field_id_5" id="field_id_5" dir="ltr" cols="50" rows="10" class="wide"></textarea>
            </p>
            

            

            

            

            
            
            <p>Expiry Date <br />
            <input type="text" name="expiration_date" value="" maxlength="23" class="wide" onclick="if(self.gfPop)gfPop.fPopCalendar(document.entryform.expiration_date);return false;" />

            </p>

            <p><input type="submit" name="submit" value="Submit" /></p>

            <input type="hidden" name="entry_date" value="2007-02-07 03:55 PM" maxlength="23" class="wide" />

            <input type="hidden" name="sticky" value="n" />
            <input type="hidden" name="allow_comments" value="n" />
            <input type="hidden" name="allow_trackbacks" value="n" />
            <input type='hidden' name='dst_enabled' value='y' />

            </form>
        </div>
        
        <div class="entry">
            <p><a href="javascript:history.go(-1)" title="« back to previous page" target="_self">« back to previous page</a></p>
        </div>
    
    </div>

<!-- navAlpha -->

<div id="navAlpha">

    <ul id="nav">
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/" title="home" target="_self" accesskey="h" tabindex="3">home</a>
        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/club/" title="club" target="_self" accesskey="c" tabindex="4">club</a>
            <ul>

                <li><a href="http://www.mofsc.com.au/index.php/main/club/news/" title="news & events" target="_self">news & events</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/contact/" title="contact" target="_self">contact</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/photos/" title="photos" target="_self">photos</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/calendar/" title="calendar" target="_self">calendar</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/links/" title="links" target="_self">links</a></li>

                <li><a href="http://www.mofsc.com.au/index.php/main/club/visitors/" title="visitor info" target="_self">visitor info</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/women/" title="club women" target="_self">club women</a></li>
            </ul>
        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/sailing/" title="sailing" target="_self" accesskey="s" tabindex="5">sailing</a>
            <ul>

                <li><a href="http://www.mofsc.com.au/index.php/main/sailing/news/" title="news & events" target="_self">news & events</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/sailing/results/" title="results" target="_self">results</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/sailing/rules/" title="rules" target="_self">rules</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/sailing/mysailor/" title="my sailor" target="_self">my sailor</a></li>
            </ul>
        </li>

        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/fishing/" title="fishing" target="_self" accesskey="f" tabindex="6">fishing</a>
            <ul>
                <li><a href="http://www.mofsc.com.au/index.php/main/fishing/news/" title="news & events" target="_self">news & events</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/fishing/results/" title="results" target="_self">results</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/fishing/calendar/" title="calendar" target="_self">calendar</a></li>

            </ul>
        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/cruising/" title="cruising" target="_self" accesskey="r" tabindex="7">cruising</a>
            <ul>
                <li><a href="http://www.mofsc.com.au/index.php/main/cruising/news/" title="news & events" target="_self">news & events</a></li>
            </ul>

        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/powerboat/" title="powerboat" target="_self" accesskey="p" tabindex="8">powerboat</a>
            <ul>
                <li><a href="http://www.mofsc.com.au/index.php/main/powerboat/news/" title="news & events" target="_self">news & events</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/powerboat/results/" title="results" target="_self">results</a></li>

            </ul>
        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/dinghy/" title="dinghy" target="_self" accesskey="d" tabindex="9">dinghy</a>
            <ul>
                <li><a href="http://www.mofsc.com.au/index.php/main/dinghy/news/" title="news & events" target="_self">news & events</a></li>
            </ul>

        </li>
    </ul>

</div>
<!-- eof navAlpha -->

<div id="copyright">

<div id="navBeta">

<a href="http://www.mofsc.com.au/index.php/main/" title="home" target="_self">home</a> | 
<a href="http://www.mofsc.com.au/index.php/main/club/" title="club" target="_self">club</a> | 

<a href="http://www.mofsc.com.au/index.php/main/sailing/" title="sailing" target="_self">sailing</a> | 
<a href="http://www.mofsc.com.au/index.php/main/fishing/" title="fishing" target="_self">fishing</a> | 
<a href="http://www.mofsc.com.au/index.php/main/cruising/" title="cruising" target="_self">cruising</a> | 
<a href="http://www.mofsc.com.au/index.php/main/powerboat/" title="powerboat" target="_self">powerboat</a> | 
<a href="http://www.mofsc.com.au/index.php/main/dinghy/" title="dinghy" target="_self">dinghy</a> | 
<a href="http://www.mofsc.com.au/index.php/main/sitemap/" title="sitemap" target="_self">sitemap</a> | 

<a href="http://www.mofsc.com.au/index.php/main/access/" title="access" target="_self">access</a>

</div>

<p>© 2007 <a href="http://www.mofsc.com.au/index.php/main/" title="Mandurah Offshore Fishing and Sailing Club" target="_self">Mandurah Offshore Fishing and Sailing Club</a></p>

</div>

<!-- close wrapper -->
</div>

<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=188 height=166 name="gToday:datetime:agenda.js:gfPop:plugins_time.js" id="gToday:datetime:agenda.js:gfPop:plugins_time.js" src="http://www.mofsc.com.au/calendar/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">

</iframe>

</body>
</html>

I really need to get this sorted quick as I am supposed to be handing it to the client next week. I have no errors in the error console, it just wont work sad Any help would be greatly appreciated.

Thanks

Patrick

one other thing, I tried the full example, and that works fine, so I am assuming there is something wrong with my code. I am using the Expression Engine CMS for the site, but the add and edit forms that I am trying to apply xinha to are not within the CP, they are part of the main site itself, so not sure if this makes any difference to the solution...

http://www.mofsc.com.au/xinha/examples/ … ample.html

Last edited by AussieFreelancer (2007-02-07 03:49:18)

Offline

#129 2007-02-07 07:12:10

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

Re: Newbie Guide

You're calling the onload manger function incorrectly, it should be

womAdd('xinha_init()');

I advise you though to drop the WOM completely, because it doesn't look very well programmed. There are function in Xinha that accomplish this task, so I propose you use

Xinha.addDom0Event(window,'load',startList);
Xinha.addDom0Event(window,'load',xinha_init);

Offline

#130 2007-02-07 19:42:25

AussieFreelancer
Xinha Community Member
From: Waroona, WA, Australia
Registered: 2007-02-07
Posts: 22

Re: Newbie Guide

hi ray,

at your suggesting, I have removed WOM from the code, and have used the addevent method as you also suggested. Dropdown menu works good, so that obviously works still smile

But I still have a blank textarea sad Hopefully I can sort this out today :s

Thanks for the help so far... here is my code now:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <!-- Metadata Package -->
    <meta name="beginpackage" content="Mandurah Offshore Fishing and Sailing Club"></meta>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
    <meta name="name" content="Mandurah Offshore Fishing and Sailing Club"></meta>
    <meta name="author" content="Aussie Freelancer"></meta>
    <meta name="keywords" content="mandurah, offshore, fishing, sailing, club"></meta>
    <meta name="description" content=""></meta>

    <meta name="distribution" content="global"></meta>
    <meta name="coverage" content="worldwide"></meta>
    <meta name="endpackage" content="Mandurah Offshore Fishing and Sailing Club"></meta>
    <!-- End of Metadata Package -->

    <!-- Website Title -->
    <title>Mandurah Offshore Fishing and Sailing Club</title>
    
    <!-- stylesheets -->
    <link rel="stylesheet" type="text/css" media="screen, projection" href="http://www.mofsc.com.au/index.php/styles/standard_css/" ></link>

    <!-- eof stylesheets -->
    
    <!-- scripts -->

        <script type="text/javascript">
        _editor_url  = "http://www.mofsc.com.au/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://www.mofsc.com.au/xinha/XinhaCore.js"></script>

                
        <!-- suckerfish -->
        <script language="javascript" type="text/javascript">
            startList = function() 
            {
                if (document.all&&document.getElementById) 
                {
                    navRoot = document.getElementById("nav");
                    for (i=0; i<navRoot.childNodes.length; i++) 
                    {
                        node = navRoot.childNodes[i];
                        if (node.nodeName=="LI") 
                        {
                            node.onmouseover=function() 
                            {
                                this.className+=" over";
                            }
                            node.onmouseout=function() 
                            {
                                this.className=this.className.replace(" over", "");
                            }
                        }
                    }
                }
            }
        </script>

        <!-- eof suckerfish -->
        
        <!-- rte -->
        <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',
        'FullScreen',
        'ListType',
        'SpellChecker',
        'Stylist',
        'SuperClean',
        'TableOperations'
        ];
             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
             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 :
        [
        'field_id_5',
        'field_id_7'
        ];

        /** 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.addDom0Event(window,'load',startList);
        Xinha.addDom0Event(window,'load',xinha_init);
        
        </script>
        <!-- eof rte -->
    
    <!-- eof scripts -->
    
</head>

<body>

<!-- container -->

<div id="wrapper">

<!-- intro and header -->
<div id="intro" title="Mandurah Offshore Fishing and Sailing Club">
    <div id="header">
        
        <!-- skip links -->

        <div id="skip">
            <ul>
                <li><a href="#nav" title="skip to navigation" target="_self" accesskey="1" tabindex="1">skip to navigation</a></li>
                <li><a href="#main" title="skip to content" target="_self" accesskey="2" tabindex="2">skip to content</a></li>

            </ul>
        </div>

        
        <!-- page title and logo -->
        <h1><a href="http://www.mofsc.com.au/index.php/main/" title="Mandurah Offshore Fishing and Sailing Club" target="_self">mofsc</a></h1>
        <div class="logo">
            <img src="http://www.mofsc.com.au/images/uploads/MOFSClogo.jpg" alt="MOFSC Logo" />
        </div>
        
        <!-- random news -->

        <div id="random_news">
        
                        
            <p><strong>Latest Fishing News & Events</strong></p>
            
            
                    <p>There are no news and events at this time.</p>
                
        
        </div>
        <!-- eof random news -->
        
        <!-- admin login -->
                
                <div class="admin_tools">

            <p>
                <a href="http://www.mofsc.com.au/index.php/member/profile/" title="My Profile" target="_self">My Profile</a> | 
                <a href="http://www.mofsc.com.au/index.php?ACT=10" title="Log Out" target="_self">Log Out</a>
            </p>
        </div>
                <!-- eof admin login -->
        
    </div>
</div>

<!-- eof intro and header -->

    <a name="main"></a>
    <div id="main">
    
        <div id="rotating_images">
            
                <img src="http://www.mofsc.com.au/images/uploads/dinghypic_30.jpg" alt="image" width="281" height="424" />
            <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
         xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
    rdf:about="http://www.mofsc.com.au/index.php/rotating_images_club_house/"
    trackback:ping="http://www.mofsc.com.au/index.php/trackback/3/"
    dc:title="Rotating Images: Club House"
    dc:identifier="http://www.mofsc.com.au/index.php/rotating_images_club_house/" 
    dc:subject=""
    dc:description="&lt;img src="http://www.mofsc.com.au/images/uploads/dinghypic_30.jpg" alt="image" width="281" height="424" /&gt;"
    dc:creator="Aussie Freelancer"
    dc:date="2007-02-01 03:36:00 AM GMT" />
</rdf:RDF>
-->
        </div>
            
        <div class="entry">
            <h1>Add Entry</h1>

        </div>
        
        <div id="entry_form">
            <form id='entryform' name='entryform' method="post" action="http://www.mofsc.com.au/index.php/main/add/club_news/club/news/"  >
<div>
<input type="hidden" name="ACT" value="18" />
<input type="hidden" name="RET" value="http://www.mofsc.com.au/index.php/main/add/club_news/club/news/" />
<input type="hidden" name="PRV" value="main/club/news" />
<input type="hidden" name="URI" value="/main/add/club_news/club/news/" />
<input type="hidden" name="XID" value="01c7f066d02cd0e04b9af57314dceeabcafd7429" />
<input type="hidden" name="return_url" value="main/club/news" />
<input type="hidden" name="author_id" value="1" />
<input type="hidden" name="weblog_id" value="3" />
<input type="hidden" name="field_ft_4" value="none" />
<input type="hidden" name="field_ft_5" value="xhtml" />

</div>

        <script type="text/javascript"> 
        <!--
        function liveUrlTitle()
        {
            var defaultTitle = '';
            var NewText = document.getElementById("title").value;
            
            if (defaultTitle != '')
            {
                if (NewText.substr(0, defaultTitle.length) == defaultTitle)
                {
                    NewText = NewText.substr(defaultTitle.length)
                }    
            }
            
            NewText = NewText.toLowerCase();
            var separator = "_";
            
            if (separator != "_")
            {
                NewText = NewText.replace(/\_/g, separator);
            }
            else
            {
                NewText = NewText.replace(/\-/g, separator);
            }
    
            // Foreign Character Attempt
            
            var NewTextTemp = '';
            for(var pos=0; pos<NewText.length; pos++)
            {
                var c = NewText.charCodeAt(pos);
                
                if (c >= 32 && c < 128)
                {
                    NewTextTemp += NewText.charAt(pos);
                }
                else
                {
                    if (c == '223') {NewTextTemp += 'ss'; continue;}
                if (c == '224') {NewTextTemp += 'a'; continue;}
                if (c == '225') {NewTextTemp += 'a'; continue;}
                if (c == '226') {NewTextTemp += 'a'; continue;}
                if (c == '229') {NewTextTemp += 'a'; continue;}
                if (c == '227') {NewTextTemp += 'ae'; continue;}
                if (c == '230') {NewTextTemp += 'ae'; continue;}
                if (c == '228') {NewTextTemp += 'ae'; continue;}
                if (c == '231') {NewTextTemp += 'c'; continue;}
                if (c == '232') {NewTextTemp += 'e'; continue;}
                if (c == '233') {NewTextTemp += 'e'; continue;}
                if (c == '234') {NewTextTemp += 'e'; continue;}
                if (c == '235') {NewTextTemp += 'e'; continue;}
                if (c == '236') {NewTextTemp += 'i'; continue;}
                if (c == '237') {NewTextTemp += 'i'; continue;}
                if (c == '238') {NewTextTemp += 'i'; continue;}
                if (c == '239') {NewTextTemp += 'i'; continue;}
                if (c == '241') {NewTextTemp += 'n'; continue;}
                if (c == '242') {NewTextTemp += 'o'; continue;}
                if (c == '243') {NewTextTemp += 'o'; continue;}
                if (c == '244') {NewTextTemp += 'o'; continue;}
                if (c == '245') {NewTextTemp += 'o'; continue;}
                if (c == '246') {NewTextTemp += 'oe'; continue;}
                if (c == '249') {NewTextTemp += 'u'; continue;}
                if (c == '250') {NewTextTemp += 'u'; continue;}
                if (c == '251') {NewTextTemp += 'u'; continue;}
                if (c == '252') {NewTextTemp += 'ue'; continue;}
                if (c == '255') {NewTextTemp += 'y'; continue;}
                if (c == '257') {NewTextTemp += 'aa'; continue;}
                if (c == '269') {NewTextTemp += 'ch'; continue;}
                if (c == '275') {NewTextTemp += 'ee'; continue;}
                if (c == '291') {NewTextTemp += 'gj'; continue;}
                if (c == '299') {NewTextTemp += 'ii'; continue;}
                if (c == '311') {NewTextTemp += 'kj'; continue;}
                if (c == '316') {NewTextTemp += 'lj'; continue;}
                if (c == '326') {NewTextTemp += 'nj'; continue;}
                if (c == '353') {NewTextTemp += 'sh'; continue;}
                if (c == '363') {NewTextTemp += 'uu'; continue;}
                if (c == '382') {NewTextTemp += 'zh'; continue;}
                if (c == '256') {NewTextTemp += 'aa'; continue;}
                if (c == '268') {NewTextTemp += 'ch'; continue;}
                if (c == '274') {NewTextTemp += 'ee'; continue;}
                if (c == '290') {NewTextTemp += 'gj'; continue;}
                if (c == '298') {NewTextTemp += 'ii'; continue;}
                if (c == '310') {NewTextTemp += 'kj'; continue;}
                if (c == '315') {NewTextTemp += 'lj'; continue;}
                if (c == '325') {NewTextTemp += 'nj'; continue;}
                if (c == '352') {NewTextTemp += 'sh'; continue;}
                if (c == '362') {NewTextTemp += 'uu'; continue;}
                if (c == '381') {NewTextTemp += 'zh'; continue;}
                
                }
            }
    
            NewText = NewTextTemp;
            
            NewText = NewText.replace('/<(.*?)>/g', '');
            NewText = NewText.replace('/\&#\d+\;/g', '');
            NewText = NewText.replace('/\&\#\d+?\;/g', '');
            NewText = NewText.replace('/\&\S+?\;/g','');
            NewText = NewText.replace(/['\"\?\.\!*$\#@%;:,=\(\)\[\]]/g,'');
            NewText = NewText.replace(/\s+/g, separator);
            NewText = NewText.replace(/\//g, separator);
            NewText = NewText.replace(/[^a-z0-9-_]/g,'');
            NewText = NewText.replace(/\+/g, separator);
            NewText = NewText.replace(/[-_]+/g, separator);
            NewText = NewText.replace(/\&/g,'');
            NewText = NewText.replace(/-$/g,'');
            NewText = NewText.replace(/_$/g,'');
            NewText = NewText.replace(/^_/g,'');
            NewText = NewText.replace(/^-/g,'');
            
            if (document.getElementById("url_title"))
            {
                document.getElementById("url_title").value = "" + NewText;            
            }
            else
            {
                document.forms['entryform'].elements['url_title'].value = "" + NewText; 
            }        
        }


        function showhide_item(id)
        {
            if (document.getElementById(id).style.display == "block")
            {
                document.getElementById(id).style.display = "none";
            }
            else
            {
                document.getElementById(id).style.display = "block";
            }
        }
        
        
        -->
        </script>

            <input type="hidden" name="title" id="title" value="club_news_20070208082601" maxlength="100" class="wide" />

            <input type="hidden" name="url_title" id='url_title' value="club_news_20070208082601" maxlength="75" class="wide" />

            <p><a href="http://www.mofsc.com.au/systemcp/index.php?S=4eeabcb4f853afe1deaf168e047aa87903d5506f&C=publish&M=file_upload_form&field_group=1&Z=1" onclick="window.open(this.href, '_blank', 'width=400,height=600');return false;" onkeypress="this.onclick()">File Upload</a></p>

            <p>* Entry Title<br />

            

            
            <input type="text" dir="ltr" name="field_id_4" value="" maxlength="128" size="50" class="wide" /></p>
            

            

            

            <p>* Entry Content<br />

            
            <textarea name="field_id_5" id="field_id_5" dir="ltr" cols="50" rows="10" class="wide"></textarea>
            </p>
            

            

            

            

            
            
            <p>Expiry Date <br />
            <input type="text" name="expiration_date" value="" maxlength="23" class="wide" onclick="if(self.gfPop)gfPop.fPopCalendar(document.entryform.expiration_date);return false;" />

            </p>

            <p><input type="submit" name="submit" value="Submit" /></p>

            <input type="hidden" name="entry_date" value="2007-02-08 08:26 AM" maxlength="23" class="wide" />

            <input type="hidden" name="sticky" value="n" />
            <input type="hidden" name="allow_comments" value="n" />
            <input type="hidden" name="allow_trackbacks" value="n" />
            <input type='hidden' name='dst_enabled' value='y' />

            </form>
        </div>
        
        <div class="entry">
            <p><a href="javascript:history.go(-1)" title="« back to previous page" target="_self">« back to previous page</a></p>
        </div>
    
    </div>

<!-- navAlpha -->

<div id="navAlpha">

    <ul id="nav">
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/" title="home" target="_self" accesskey="h" tabindex="3">home</a>
        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/club/" title="club" target="_self" accesskey="c" tabindex="4">club</a>
            <ul>

                <li><a href="http://www.mofsc.com.au/index.php/main/club/news/" title="news & events" target="_self">news & events</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/contact/" title="contact" target="_self">contact</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/photos/" title="photos" target="_self">photos</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/calendar/" title="calendar" target="_self">calendar</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/links/" title="links" target="_self">links</a></li>

                <li><a href="http://www.mofsc.com.au/index.php/main/club/visitors/" title="visitor info" target="_self">visitor info</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/club/women/" title="club women" target="_self">club women</a></li>
            </ul>
        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/sailing/" title="sailing" target="_self" accesskey="s" tabindex="5">sailing</a>
            <ul>

                <li><a href="http://www.mofsc.com.au/index.php/main/sailing/news/" title="news & events" target="_self">news & events</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/sailing/results/" title="results" target="_self">results</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/sailing/rules/" title="rules" target="_self">rules</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/sailing/mysailor/" title="my sailor" target="_self">my sailor</a></li>
            </ul>
        </li>

        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/fishing/" title="fishing" target="_self" accesskey="f" tabindex="6">fishing</a>
            <ul>
                <li><a href="http://www.mofsc.com.au/index.php/main/fishing/news/" title="news & events" target="_self">news & events</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/fishing/results/" title="results" target="_self">results</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/fishing/calendar/" title="calendar" target="_self">calendar</a></li>

            </ul>
        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/cruising/" title="cruising" target="_self" accesskey="r" tabindex="7">cruising</a>
            <ul>
                <li><a href="http://www.mofsc.com.au/index.php/main/cruising/news/" title="news & events" target="_self">news & events</a></li>
            </ul>

        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/powerboat/" title="powerboat" target="_self" accesskey="p" tabindex="8">powerboat</a>
            <ul>
                <li><a href="http://www.mofsc.com.au/index.php/main/powerboat/news/" title="news & events" target="_self">news & events</a></li>
                <li><a href="http://www.mofsc.com.au/index.php/main/powerboat/results/" title="results" target="_self">results</a></li>

            </ul>
        </li>
        
        <li>
            <a href="http://www.mofsc.com.au/index.php/main/dinghy/" title="dinghy" target="_self" accesskey="d" tabindex="9">dinghy</a>
            <ul>
                <li><a href="http://www.mofsc.com.au/index.php/main/dinghy/news/" title="news & events" target="_self">news & events</a></li>
            </ul>

        </li>
    </ul>

</div>
<!-- eof navAlpha -->

<div id="copyright">

<div id="navBeta">

<a href="http://www.mofsc.com.au/index.php/main/" title="home" target="_self">home</a> | 
<a href="http://www.mofsc.com.au/index.php/main/club/" title="club" target="_self">club</a> | 

<a href="http://www.mofsc.com.au/index.php/main/sailing/" title="sailing" target="_self">sailing</a> | 
<a href="http://www.mofsc.com.au/index.php/main/fishing/" title="fishing" target="_self">fishing</a> | 
<a href="http://www.mofsc.com.au/index.php/main/cruising/" title="cruising" target="_self">cruising</a> | 
<a href="http://www.mofsc.com.au/index.php/main/powerboat/" title="powerboat" target="_self">powerboat</a> | 
<a href="http://www.mofsc.com.au/index.php/main/dinghy/" title="dinghy" target="_self">dinghy</a> | 
<a href="http://www.mofsc.com.au/index.php/main/sitemap/" title="sitemap" target="_self">sitemap</a> | 

<a href="http://www.mofsc.com.au/index.php/main/access/" title="access" target="_self">access</a>

</div>

<p>© 2007 <a href="http://www.mofsc.com.au/index.php/main/" title="Mandurah Offshore Fishing and Sailing Club" target="_self">Mandurah Offshore Fishing and Sailing Club</a></p>

</div>

<!-- close wrapper -->
</div>

<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=188 height=166 name="gToday:datetime:agenda.js:gfPop:plugins_time.js" id="gToday:datetime:agenda.js:gfPop:plugins_time.js" src="http://www.mofsc.com.au/calendar/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">

</iframe>

</body>
</html>

Offline

#131 2007-02-07 21:12:28

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

Re: Newbie Guide

Ah, sorry, forgot to mention this in the first place.

        xinha_editors = xinha_editors ? xinha_editors :
        [
        'field_id_5',
        'field_id_7' // there's no field_id_7 id in the document, you can have only id's here there that are actually in the page
        ];

Offline

#132 2007-02-07 21:40:25

AussieFreelancer
Xinha Community Member
From: Waroona, WA, Australia
Registered: 2007-02-07
Posts: 22

Re: Newbie Guide

Ahh wow, that worked a treat big_smile well, at least the buttons are there and it uploads content so that is 95% there big_smile

the problem I have now though, is that I just tried copying from an email and pasting into the field. The output which includes tables, header tags etc, is totally weird with huge spaces all through, and it is basically a mess. Is it possible to copy and paste from say word, into these textareas?

Thanks so much for your help with this I really appreciate it

Thanks

Patrick

Offline

#133 2007-02-07 22:10:32

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

Re: Newbie Guide

Well, possible is everything wink
Pasting from other sources like word usually causes a mess, that's an unfortunate fact. You may want to try the SuperClean plugin in that case

Offline

#134 2007-02-08 01:10:57

AussieFreelancer
Xinha Community Member
From: Waroona, WA, Australia
Registered: 2007-02-07
Posts: 22

Re: Newbie Guide

Hi Ray, hey thanks so much for your help with this. I have to admit I was quite in despair yesterday! The superclean unfortunately wasn't super enough, although it did make a bit of difference.

Thanks to your help, I now have insert and edit forms working on my site. I also changed the javascript in step 2 to dynamically apply xinha to all textareas as discussed at http://www.pmachine.com/forums/viewthread/34818/#170340 which worked a treat as well.

So thanks very much, if I have any more questions I will be sure to post! Hopefully now this will be suitable for my client.

Patrick

Offline

#135 2007-02-14 17:01:53

ronhinds
New member
From: Minden, NV, USA
Registered: 2007-02-14
Posts: 8

Re: Newbie Guide

I've installed xinha on my web server (IIS) and the examples (save those relying on PHP ;-) are working. So I added two editors to one of my own pages. While the editors themselves seem to work, they don't seem to be saving the content in the associated TEXTAREAs, at least not consistently. The first one finally did save it at least once, but the other still hasn't. Here's the page (it includes ASP code also):

<%@ Language=VBScript %>

<!-- #include file="scripts/ADO.asp" -->
<!-- #include file="scripts/DBOpen.asp" -->

<%
    Dim ValidationID
    Dim ContentID
    Dim PageName
    Dim PageType
    Dim Title
    Dim Content
    Dim Graphic
    Dim Caption
    Dim StartDate
    Dim EndDate
    Dim Price
    Dim PartNumber
    Dim Share
    Dim ButtonText
    
    ValidationID = Request.QueryString("ValidationID")
    ContentID = Request.QueryString("ContentID")
    PageName = Request.QueryString("PageName")
    PageType = Request.QueryString("PageType")
%>

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT type="text/javascript">
   _editor_url = "/xinha/";
   _editor_lang = "en";
</SCRIPT>
<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()
{
    /** 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',
     'FullScreen',
     'ListType',
     'SpellChecker',
     'Stylist',
     'SuperClean',
     'TableOperations'
    ];
           
    // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
    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 :
    [
      'Title',
      'Content'
    ];

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

    xinha_editors.Title.config.height = '200px';
    xinha_editors.Content.config.height = '400px';

    /** STEP 6 ***************************************************************
     * Finally we "start" the editors, this turns the textareas into
     * Xinha editors.
     ************************************************************************/

    Xinha.startEditors(xinha_editors);
}

window.onload = xinha_init;

</SCRIPT>
<!-- #include file="scripts/Styles.asp" -->
<SCRIPT lang=JScript>
function updateContent(action)
{
    document.getElementsByName("Action").item(0).value = action;
    document.EditContent.submit();
}
</SCRIPT>
</HEAD>
<%
    oRS.Open "SELECT * FROM tblWebPages WHERE ContentID=" & ContentID, oConn, adOpenStatic, adLockReadOnly
    
    If Not oRS.EOF Then
        If Len(oRS("Content")) > 0 Then
            Content = Replace(oRS("Content"), "<BR>", vbCrLf)
        End If
        
        If Len(oRS("Title")) > 0 Then
            Title = Replace(oRS("Title"), "<BR>", vbCrLf)
        End If
        
        Graphic = oRS("Graphic")
        Caption = oRS("Caption")
        StartDate = oRS("StartDate")
        EndDate = oRS("EndDate")
        Price = oRS("Price")
        PartNumber = oRS("PartNumber")
        Share = oRS("Share")
    End If
    
    oRS.Close
%>
<BODY>

<FORM name="EditContent" action="AdminContentUpdate.asp" method=POST>
<P align=center>
 
<INPUT type=hidden name="ValidationID" value="<%=ValidationID%>">
<INPUT type=hidden name="ContentID" value="<%=ContentID%>">
<INPUT type=hidden name="PageName" value="<%=PageName%>">
<INPUT type=hidden name="PageType" value="<%=PageType%>">
<INPUT type=hidden name="Graphic" value="<%=Graphic%>">
<INPUT type=hidden name="Action" value="">
<%    If Len(StartDate) < 1 Then    %>
<INPUT type=hidden name="StartDate" value="<%=Date%>"><BR>
<%    Else    %>
<INPUT type=hidden name="StartDate" value="<%=StartDate%>"><BR>
<%    End If    %>

<CAPTION align="top" for="Title">Title</CAPTION><BR>
<TEXTAREA id=Title style="WIDTH: 444px; HEIGHT: 50px" name=Title rows=9 cols=48><%=Title%></TEXTAREA><BR><BR>
<CAPTION for="EndDate">Expiration Date</CAPTION>
<INPUT id=EndDate name="EndDate" value="<%=EndDate%>">
<BR><BR>
<CAPTION for="Share">Share this content?</CAPTION>
<INPUT type=checkbox id=Share name="Share" value='True' <% If Share Then %> checked <% End If %>><BR><BR>
<CAPTION align="top" for="Content">Description</CAPTION><BR>
<TEXTAREA id=Content style="WIDTH: 444px; HEIGHT: 174px" name=Content rows=9 cols=48><%=Content%></TEXTAREA><BR><BR>
<%    
    If Len(Graphic) > 0 Then
        ButtonText = "Change Graphic"
%>
<IMG id=g1 src="images/<%=Graphic%>" width=125px height=125px>
<CAPTION for="Caption">Caption for this Graphic</CAPTION>
<INPUT id=Caption name="Caption" value="<%=Caption%>"><BR><BR>
<INPUT onclick="updateContent('Delete Graphic')" type=button value="Delete Graphic" name=DeleteGraphic>     
<%    
    Else
        ButtonText = "Add Graphic"
    End If
%>
<INPUT onclick="updateContent('<%=ButtonText%>')" type=button value="<%=ButtonText%>" name=ButtonText><BR><BR>
<INPUT onclick="updateContent('Save')" type=button value="Save" name=Save>     
<INPUT onclick="updateContent('Delete')" type=button value="Delete" name=Delete>
<br>
<br>
<p>
For Advanced Users only.  <br>
If you are a competent HTML coder
You can now run straight HTML code on your home page
the graphices files are kept in /imgages/   

<INPUT onclick="updateContent('Advanced')" type=button value="Save as HTML" name=Advanced>
</p>
</P>
</Form>



</BODY>
</HTML>

<!-- #include file="scripts/DBClose.asp" -->

Last edited by ronhinds (2007-02-14 17:06:51)

Offline

#136 2007-02-15 10:14:33

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

Re: Newbie Guide

function updateContent(action)
{
    document.getElementsByName("Action").item(0).value = action;
    document.EditContent.onsubmit();  // This has to be called first to copy the editor contents to the textarea
    document.EditContent.submit();
}

This has been fixed in revision 730 of Feb 12, but is not yet in the distribution.

Offline

#137 2007-02-15 14:54:30

ronhinds
New member
From: Minden, NV, USA
Registered: 2007-02-14
Posts: 8

Re: Newbie Guide

Thank you, Ray! That worked. Now comes the fun part: configuring it! cool

Offline

#138 2007-02-15 20:49:44

ronhinds
New member
From: Minden, NV, USA
Registered: 2007-02-14
Posts: 8

Re: Newbie Guide

OK I tried doing some custome configuration of the toolbar. When I do, I get an error:

Line:    1495
Error:    'length' is null or not an object

It is in this block of code:

  //backwards-compatibility: load FullScreen-Plugin if we find a "popupeditor"-button in the toolbar
  // @todo: remove the backward compatibility in release 2.0
  var toolbar = editor.config.toolbar;
  for ( i = toolbar.length; --i >= 0; )
  {
    for ( var j = toolbar[i].length; --j >= 0; )
    {
      if ( toolbar[i][j]=="popupeditor" )
      {
        if ( typeof FullScreen == "undefined" )
        {
          // why can't we use the following line instead ?
//          Xinha.loadPlugin("FullScreen", this.generate );
          Xinha.loadPlugin("FullScreen", function() { editor.generate(); } );
          return false;
        }
        editor.registerPlugin('FullScreen');
      }
    }
  }

The error is in this line:

for ( var j = toolbar[i].length; --j >= 0; )

Here is my code that causes the problem:

    xinha_editors.Title.config.toolbar =  
    [
        ["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
        ["linebreak","separator","forecolor","hilitecolor","textindicator"],
        ["separator","justifyleft","justifycenter","justifyright","justifyfull"],
        ["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
    ];

If I comment that out everything works fine again. If you want to see the rest of the code on my page, it is in my post from yesterday.

Offline

#139 2007-02-15 20:54:32

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

Re: Newbie Guide

 ["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
    ];

should be

 ["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko) ? [] : ["cut","copy","paste","overwrite","saveas"] // note the parenthesis and the comma
    ];

Offline

#140 2007-02-15 21:19:27

ronhinds
New member
From: Minden, NV, USA
Registered: 2007-02-14
Posts: 8

Re: Newbie Guide

Thanks again, Ray! I had copied that out of the List of Available Options then cut the ones I didn't want. I am very impressed with xinha. cool

Offline

#141 2007-02-23 10:13:50

seanox
New member
Registered: 2007-02-23
Posts: 3

Re: Newbie Guide

Hi all!

I followed the newbie guide, but can't run it properly. The text area is a normal text area, and the error message says: Xinha is not defined. Any ideas? Yes the URL is correct. The textarea has the id attribute and the same id is given at the correct zone.

This is my code. I use Coldfusion:


<script type="text/javascript">
    _editor_url  = "/xinha/"; 
    _editor_lang = "hu";     
  </script>

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

      xinha_init = xinha_init ? xinha_init : function()
    {
     
      xinha_plugins = xinha_plugins ? xinha_plugins :
      [
       'CharacterMap',
       'ContextMenu',
       'FullScreen',
       'ListType',
       'SpellChecker',
       'Stylist',
       'SuperClean',
       'TableOperations'
      ];

      if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;

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

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

      xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);

      Xinha.startEditors(xinha_editors);
    }

    Xinha._addEvent(window,'load', xinha_init);

</script>


My browser says that Xinha is not defined at line 120. I checked that line and I found: Xinha._addEvent(window,'load', xinha_init);

If you have any idea regarding my problem, please post it here. thank you!

Viktor

Offline

#142 2007-02-23 10:56:57

seanox
New member
Registered: 2007-02-23
Posts: 3

Re: Newbie Guide

Meantime I solved the problem. Checked out the Xinha is undefined topic. Sorry, I didn't find it earlier.

Offline

#143 2007-03-01 00:14:09

danielb
New member
Registered: 2007-03-01
Posts: 2

Re: Newbie Guide

Hi, I have followed the newbie guide to install Xinha and it doesn't load at all in the form

When I try to view javascript it can't find one of the files

http://sddfsgdfgsg.com.au/uploaded/xinh … -screen.js

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /uploaded/xinha/plugins/FullScreen/full-screen.js was not found on this server.</p>
<hr>
<address>Apache/2.0.52 (CentOS) Server at dfgdfgsd.com.au Port 80</address>
</body></html>

Because the files are actually called 'full-page' not full screen...

Last edited by danielb (2007-03-01 00:58:18)

Offline

#144 2007-03-01 02:00:54

danielb
New member
Registered: 2007-03-01
Posts: 2

Re: Newbie Guide

LOL you forgot to include the plugins/FullScreen directory in the download!!  I stole it out of a previous version and it works.

Offline

#145 2007-03-05 15:38:30

Hobet
New member
Registered: 2007-03-05
Posts: 2

Re: Newbie Guide

Hi, I have followed the newbie guide but it doesn't work at all:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</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/XinhaCore.js"></script>
  <script type="text/javascript" src="/xinha/my_config.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_plugins = xinha_plugins ? xinha_plugins :
      [
       'CharacterMap',
       'ContextMenu',
       'FullScreen',
       'ListType',
       'SpellChecker',
       'Stylist',
       'SuperClean',
       'TableOperations'
      ];
             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  smile
             if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;


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

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

      xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);


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

<body>
<textarea id="newbiearea1" name="newbiearea1" rows="10" cols="50" style="width: 100%"></textarea>
</body>
</html>

Offline

#146 2007-03-05 15:40:00

Hobet
New member
Registered: 2007-03-05
Posts: 2

Re: Newbie Guide

Offline

#147 2007-03-05 17:28:52

ronhinds
New member
From: Minden, NV, USA
Registered: 2007-02-14
Posts: 8

Re: Newbie Guide

I've got xinha working (mostly) wink. What I'm trying to make work now is the SpellChecker plugin. I'm using IIS on Windows 2000 for testing - I will be moving to Windows 2003 for production. The problem I'm having is that the SpellChecker always reports "No misspelled words found with the selected dictionary" even when I make gross spelling errors. The default dictionary is en_GB, but even if I change it to en_US, it still gives the same message. Aspell is installed; so is the dictionary. I've also installed PHP for Windows. Another question: how do I get the dictionary to default to en_US? Thanks!

Offline

#148 2007-03-06 13:03:05

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

Re: Newbie Guide

@hobet:
1. remove FullScreen from the plugins (this was an error in the NewbieGuide)
2.

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

you don't this line when you have the xinha config stuff in the same page

Offline

#149 2007-03-07 10:36:02

bosse
New member
Registered: 2007-03-07
Posts: 1

Re: Newbie Guide

Hello!
I uploaded and integrated xinha as discribed in the Newbieguide! It doesn't work

i used a body.js for this

<textarea id="{ID}" name="{NAME}" rows="10" cols="50" style="width: 100%">{VALUE}</textarea>

i used a head.js for this

<script type="text/javascript">
  _editor_url = "./javascript/editors/xinha/";
  _editor_lang = "en";
</script>

<script type="text/javascript" src="./javascript/editors/xhina/htmlarea.js"></script>
<script type="text/javascript" src="./javascript/editors/xhina/custom.js"></script>

<script type="text/javascript">
      xinha.loadPlugin("TableOperations");
      xinha.loadPlugin("ImageManager");

      function initDocument() {
    var config = new xinha.Config();
    config.toolbar = custom_toolbar;
    config.width   = custom_width;
    config.height   = custom_height;

    var editor = new xinha("{NAME}", config);

        editor.registerPlugin(TableOperations);
        editor.registerPlugin(ImageManager);
    editor.generate();
      }
</script>

<script type="text/javascript">
</script>

and a custom.js as my own configfile:

 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  :)
             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 :
      [
        '{NAME}'
        
      ];

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

the editor does not appear when the form is loaded.
whats wrong?

thanks

Last edited by bosse (2007-03-07 10:38:29)

Offline

#150 2007-03-08 18:29:54

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

Re: Newbie Guide

Sorry I don't get a concept of your configuration, please be more concrete. What does body.js and head.js mean?

Of course as always, URL is fastest and easiest

Offline

Board footer

Powered by FluxBB