Announcement

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

#1 2008-08-19 02:03:34

Aapo
New member
Registered: 2006-03-02
Posts: 4

Inserting html outside of Xinha

Is there a way to insert html to the editor outside of Xinha?

Maybe something like this:

function addToXinha(html){
   Xinha.insertHTML(html);
}

<input type="button" onclick="addToXinha("text and whatnot");" />

I tried to work around this by using an external inserting function, like http://alexking.org/blog/2003/06/02/ins … avascript/ , but that doesn't work either, the script cant find the textarea after Xinha takes over.

Thanks in advance for any hints smile

Offline

#2 2008-08-19 02:26:48

Aapo
New member
Registered: 2006-03-02
Posts: 4

Re: Inserting html outside of Xinha

Found it!

function addToXinha(html){
   xinha_editors.body.insertHTML(html);
}

(body is the id of my editor).

Last edited by Aapo (2008-08-19 02:28:05)

Offline

Board footer

Powered by FluxBB