cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <>
Subject Re: Using textarea WYSIWYG editors?
Date Wed, 08 Jul 2009 06:00:29 GMT
Derek Hohls wrote:
> Hmm.  I did follow the instructions and was unable to get the
> toolbar to display.  Do you have any working/sample code that
> I can try on my side?

This is what I have in the final HTML send back to the client:

<script type="text/javascript">
   _editor_url  = "xinha/";
   _editor_lang = "en";
   _editor_skin = "silva";
<script type="text/javascript" src="xinha/XinhaCore.js"></script>
<script type="text/javascript"
<script type="text/javascript">
   dojo.addOnLoad(function() {
    var instructions = document.getElementById('instructions');
    var node = document.getElementById('sopInstructions');
    instructions.value = node.innerHTML;

The 'instructions' represents the piece of XHTML that is being edited. I 
use Dojo 1.2 to insert XHTML into the xinha editor (and to create the 
user interface). The 'instructions' also appear in 'config.js', which 
looks like:


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



That's it. The rest of xinha is placed in a separate jar. In the sitemap 
I also have:

<map:match pattern="xinha/**">
  <map:read src="resource://xinha/{1}" />

which is placed AFTER

<map:match pattern="resource/external/**">
   <map:read src="resource/external/{1}"/>

to ensure that my config.js is used. I use cocoon 2.2, I should note.

The fact that the toolbar does not show up in your case may be caused by 
something else and has probably not so much to do with xinha itself. 
Besides xinha, do you rely on other portions of javascript that possibly 
interferes with the xinha javascript.

Hope this helps,

> Thanks
> Derek
>>>> Andre Juffer <> 07/07/09 1:59 PM >>>
> Derek Hohls wrote:
>> (with Cocoon 2.1.8 and higher)
>> Given that htmlArea is no longer under development, does anyone have some working
example of other editors?  I have tried both xinha and tinymce and cannot get either to work...
> I am using xinha and I can store the XHTML into a native XML database 
> and also place retrieved XHTML back into the editor. I have simply 
> followed the instructions on the xinha website. You should have be sure 
> that the editor returns XHTML (there is setting for this in xinha).
> There is also an editor available in Dojo toolkit. I have not tried that 
>   one.
>> Thanks
>> Derek

Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email:
University of Oulu, Finland  | WWW:
StruBioCat                   | WWW:
NordProt                     | WWW:
Triacle Biocomputing         | WWW:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message