Announcement

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

#1 2006-10-12 12:02:24

Booyakha
New member
Registered: 2006-10-12
Posts: 3

Get content with Xinha

Hello,

How can I get the content of my textarea with a Xinha function ?
For example, is there a function like : "HTMLArea.getHTMLContent()" or something like this ?

I can't use document.myform.myxinhatexterea.value, i dunno why but it doesn't work with Firefox 1.5.

Thanx for your help
Boo

Offline

#2 2006-10-12 14:30:10

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

Re: Get content with Xinha

easiest would be to call document.myform.onsubmit() which writes the contents of the editor back to the textarea

Offline

#3 2006-10-13 03:33:09

Booyakha
New member
Registered: 2006-10-12
Posts: 3

Re: Get content with Xinha

Yep but how can I can get the content of my xinha editor ?

Offline

#4 2006-10-13 05:35:51

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

Re: Get content with Xinha

The Xinha object has the method getHTML() to retrieve the content of the editor.

var editor = xinha_object; // e.g. xinha_editors.myxinhatexterea if you use the xinha_objects array or __htmlareas.indexNumber
var html = editor.outwardHtml(editor.getHTML()); //editor.outwardHtml() does some needed changes to the raw HTML from getHTML()

What exactly do you want to do?

Offline

#5 2006-10-13 07:55:51

Booyakha
New member
Registered: 2006-10-12
Posts: 3

Re: Get content with Xinha

Ho great it works !
I just wanted to get the contents of a xinha editor, it worked well with IE and Firefox 1.0 but I had a problem with Firefox 1.5 where document.myform.myxinhatextarea.value returned nothing.

Thx a lot !

Offline

Board footer

Powered by FluxBB