Jump to content


Replace Tinymce/htmlarea With Xinha


21 replies to this topic

#1 balno

    Etomite Forum Newbie

  • Member
  • 3 posts

Posted 17 May 2005 - 10:37 PM

Xinha (http://xinha.python-hosting.com/) works very well with Etomite and comes with some really nice features. I've been added this component to my own Etomite (0.6) and really enjoy using it.

This can be done in only three steps :

1) add directory xinha in /manager/media containing Xinha distribution

2) modify file /manager/actions/dynamic/mutate_settings.dynamic.action.php :
line 520 added :
<option value="3" <?php echo $which_editor==3 ? "selected='selected'" : "";?>>Xinha</option>

3) modify /manager/actions/dynamic/mutate_content.dynamic.action.php this way :

<!-- /tinyMCE --> <?php
} elseif($which_editor==3) { ?>
<!-- xinha -->
<script type="text/javascript">
  _editor_url  = 'media/xinha/';
  _editor_lang = "en";
</script>

<script type="text/javascript" src="media/xinha/htmlarea.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()
    {
      // configure plugins used by xinha
      xinha_plugins = xinha_plugins ? xinha_plugins :
      [
      // 'CSS',
      // 'DynamicCSS',
      // 'FullPage',
      'FullScreen',
      'CharacterMap',
      'ContextMenu',
   'ListType',
   // 'Stylist',
      // 'TableOperations',
      // 'InsertAnchor',
      // 'FindReplace',
      // 'DoubleClick',
      // 'CharCounter',
      // 'InsertWords',
      // 'Abbreviation',
      // 'LangMarks',
      // 'Equation',
      // 'InsertSmiley',
      'EditTag'
      ];
      if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;

      // concerned textarea is 'ta'
      xinha_editors = xinha_editors ? xinha_editors :
      [
        'ta'
      ];

       xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();
       xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
       HTMLArea.startEditors(xinha_editors);
    }

    window.onload = xinha_init;
</script>

<div style="width:100%"><textarea id="ta" name="ta" style="width:100%; height: 400px;" onChange="documentDirty=true;"><?php	echo htmlspecialchars($content['content']); ?></textarea> </div>
<?php }
} else {
...

Simple and really worthy...

François Lemarchand
balno@users.sourceforge.net

#2 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 18 May 2005 - 02:40 AM

Yeah, I've been using Xinha, as well... It should actually just be a replacement for the original HTMLArea editor because that's what it is in reality... I'm running TinyMCE, HTMLArea, Xinha, FCKeditor, and Spaw... And I'm checking out yet another one too but will hold of on the name until my testing is complete... :eto:

#3 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 18 May 2005 - 06:40 AM

i must say, i finally got round to looking at it, http://xinha.gogo.co.nz/xinha-nightly/exam...ll_example.html and with all the options down the left, those smilies really finish it off for me! :D

#4 lucky

    Etomite Forum Newbie

  • Member
  • 24 posts

Posted 18 May 2005 - 07:32 PM

I've been using XINHA as well for sometime now. I've modded my etomite to use htmlarea, tinymce, and xinha, but all i ever use is xinha.

I've integrated stylist support [uses the same setting as tinymce for location of stylesheet], and linked up the filemanager as well [which takes over settings from the etomite file manager]. It is the best solution for my purposes.

I'd love to see it replace htmlarea in future versions of etomite. I'd certainly be willing to help out towards that end.

#5 sellafield

    Etomite Forum Newbie

  • Member
  • 33 posts

Posted 20 May 2005 - 09:04 AM

Ralph (rad14701), on May 18 2005, 03:40 AM, said:

Yeah, I've been using Xinha, as well... It should actually just be a replacement for the original HTMLArea editor because that's what it is in reality... I'm running TinyMCE, HTMLArea, Xinha, FCKeditor, and Spaw... And I'm checking out yet another one too but will hold of on the name until my testing is complete... :eto:

Will any of these options be integrated in future versions of etomite?

#6 jaredc

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,193 posts

Posted 20 May 2005 - 12:39 PM

sellafield, on May 20 2005, 05:04 AM, said:

Will any of these options be integrated in future versions of etomite?
Well [yes] I [yes] can't [yes] say [yes] for [yes] sure [yes] -but [yes] perhaps [yes] I [yes] can [yes] subliminally [yes] give [yes] you [yes] a [yes] hint.

:D

#7 gtatler

    Likes Etomite Forums!

  • Member
  • PipPip
  • 338 posts

Posted 20 May 2005 - 04:10 PM

Carried out your coding but get

Parse error: parse error, unexpected '<' in /content/StartupHostPlus/g/b/www.gbtamc.co.uk/web/et/manager/actions/dynamic/mutate_content.dynamic.action.php on line 623

my code (starting at line 555) is :-

<!-- /tinyMCE -->
//gbt added


<!-- /tinyMCE --> <?php
} elseif($which_editor==3) { ?>
<!-- xinha -->
<script type="text/javascript">
_editor_url = 'media/xinha/';
_editor_lang = "en";
</script>

<script type="text/javascript" src="media/xinha/htmlarea.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()
{
// configure plugins used by xinha
xinha_plugins = xinha_plugins ? xinha_plugins :
[
// 'CSS',
// 'DynamicCSS',
// 'FullPage',
'FullScreen',
'CharacterMap',
'ContextMenu',
'ListType',
// 'Stylist',
// 'TableOperations',
// 'InsertAnchor',
// 'FindReplace',
// 'DoubleClick',
// 'CharCounter',
// 'InsertWords',
// 'Abbreviation',
// 'LangMarks',
// 'Equation',
// 'InsertSmiley',
'EditTag'
];
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;

// concerned textarea is 'ta'
xinha_editors = xinha_editors ? xinha_editors :
[
'ta'
];

xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
HTMLArea.startEditors(xinha_editors);
}

window.onload = xinha_init;
</script>

<div style="width:100%"><textarea id="ta" name="ta" style="width:100%; height: 400px;" onChange="documentDirty=true;"><?php echo htmlspecialchars($content['content']); ?></textarea> </div>
<?php }
} else {



// end gbt added


Any thoughts ?

#8 VTX

    Etomite Forum Newbie

  • Member
  • 17 posts

Posted 23 May 2005 - 07:58 AM

I also tested xinha in combination with ibrowser, works great! Only feature I miss is resizing images on the fly, like in the 'old' html-area.

#9 codemonkeypete

    Likes Etomite Forums!

  • Member
  • PipPip
  • 170 posts

Posted 03 June 2005 - 06:51 AM

I have to be totally honest. I don't really think etomite needs it. TinyMC is a lightweight, fast loading editor, and for the extra poop HTMLAREA covers things nicely. Its great that we/you can add more editors to the etomite structure, but personally, i really do hope that the next version of eto' won't be overbloated with un-needed poop... thats my :2c: worth anyway... (well, almost - I WOULD love to see a flash editor integrated - fast loading, css compliant,xml ready...now that would be cool)

#10 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 03 June 2005 - 07:14 AM

Hiya Repete, Xinha is the replacement to HTMLArea - they producers of the HTMLArea decided to scrap the product, so a fork came along, called xinha :)

So more than likely, HTMLArea will dissapear and be replaced in the eto core (as far as i am aware)

#11 koeniman

    Likes Etomite Forums!

  • Member
  • PipPip
  • 215 posts

Posted 13 June 2005 - 01:56 PM

This Xinha looks alright. 2 things that i can't figure out:
-How do i get the imagemanager to work? (and allow me to upload)
-How do i get, as shown on the demo of Xinha, the styles menu aside. This is what makes it worth while changing to me.

In close combi of second question: How do i get the editor to use my css instead of...
Did a "find and replace" of "media/editor.css" to "assests/site/style.css", but this doesn't do it with none of the editors.

Can i specify not to show the tekstcolor option, cause theire's no point in css if user can overwrite the styles at will, espacialy if you don't want to manualy change everything when lets say the bg-color changes. :(

#12 Ravage

    Etomite Forum Newbie

  • Member
  • 13 posts

Posted 23 June 2005 - 11:30 PM

Hi, I made added xinha to my manager the way you described but when going into edit of a page, it just displayes pure html code of the page, no buttons or things what so ever, just a box with the html code of the page in it :s

Any help on this?

#13 barnkin

    Etomite Forum Newbie

  • Member
  • 1 posts

Posted 25 June 2005 - 11:24 AM

Ravage, on Jun 24 2005, 12:30 AM, said:

Hi, I made added xinha to my manager the way you described but when going into edit of a page, it just displayes pure html code of the page, no buttons or things what so ever, just a box with the html code of the page in it :s

Any help on this?

I am having the same problem.

#14 mrruben5

    Likes Etomite Forums!

  • Member
  • PipPip
  • 255 posts

Posted 07 July 2005 - 12:23 PM

It loads slow and in opera it doen't load at all.

I hate to agree with repetemedia, tinymce is the best. Only one option would be good and that is the support of inserting smilies :P

#15 mmjaeger

    Likes Etomite Forums!

  • Member
  • PipPip
  • 343 posts

Posted 07 July 2005 - 02:16 PM

mrruben5, on Jul 7 2005, 02:23 PM, said:

It loads slow and in opera it doen't load at all.

I hate to agree with repetemedia, tinymce is the best. Only one option would be good and that is the support of inserting smilies :P

there is a emotions plugins in tinymce

#16 Guest_clubvibe_*

  • Guests

Posted 19 August 2005 - 06:15 PM

i installed Xinha because of the good mark up in html. i'd like to setup the image path right, so that I can use preview images. and my second request is the right modification to preview the smileys just right.

Summary:

1. instering an image works fine, but i can't preview and use the 'image library' what mod do i need to set them right.

2. inserting a smiley works, but i can't preview them (it chooses the wrong path). what mod do i need to set the path right?

i installed Xinha the way balno explained it

#17 Guest_clubvibe_*

  • Guests

Posted 19 August 2005 - 06:23 PM

I find Xinha a nice editor but it's veeeeeeeerrrrrrryyyyyyy slooooowwwwwwwww.....

the only problem i have with html area and Tinymce is the HTML-source view. both are rubbish. a completed disorded mess.
my question now is: Is there a mod for HTML area or Tinymce which has a better (structured) HTML-source view?

#18 jaredc

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,193 posts

Posted 19 August 2005 - 08:00 PM

If I remember right, HTMLArea will respect your HTML formatting in *SOME* browsers... but off hand I can't remember which. A little experimenting might lead you to an answer. Or it could all be a red herring...

#19 mrruben5

    Likes Etomite Forums!

  • Member
  • PipPip
  • 255 posts

Posted 22 August 2005 - 02:31 PM

Line breaks. That's what we want.

#20 El_Padre

    Etomite Forum Newbie

  • Member
  • 6 posts

Posted 29 September 2005 - 10:11 PM

very good post thanks a lot





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users