Announcement

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

#1 2008-06-06 07:30:39

Pioden
Xinha Community Member
From: Bangor, Wales
Registered: 2008-06-06
Posts: 39
Website

Pre Loading Content

Hi,

I'm 'converting' from Kevin Roth's RTE to Xinha and need a little help to sort my code out! I need to load content into Xinha for users to edit.  How do I do this? I couldn't see anything obvious in the documentation.

TIA

Huw

Offline

#2 2008-06-07 06:58:26

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

Re: Pre Loading Content

Q: How do I set the content of the editor?

    * A: To set the initial editor content, simply put the entized HTML into the initial textarea
    * A: To set the content dynamically by Javascript, use the editor.setEditorContent(html) method

(Added to FAQ)

Offline

#3 2008-06-08 11:53:21

Pioden
Xinha Community Member
From: Bangor, Wales
Registered: 2008-06-06
Posts: 39
Website

Re: Pre Loading Content

Hmmmm. I tried setting the text area value but it didn't work for me :-(

<div>
<textarea id="myTextArea" name="myTextArea" rows="25" cols="50" style="width: 800px; height:500px">Is my text here</textarea>
</div>

When I load the page the Xinha text area is blank. Strange. I'll try the JS method tomorrow.

Thanks for the help.

Huw

Offline

#4 2008-06-09 09:14:47

Pioden
Xinha Community Member
From: Bangor, Wales
Registered: 2008-06-06
Posts: 39
Website

Re: Pre Loading Content

But today that exact code works ..... !!!! Very strange. I'm guessing that the success today has something to do with me opening and closing the browser. Yesterday I was just refreshing. Does Xinha cache content at all?  ... nothing else makes sense!

Offline

Board footer

Powered by FluxBB