You are not logged in.
Pages: 1
Hi folks.
I have Xinha loading in an iframe called "editor", and I try to control it from another iframe. I have it working when I load Xinha the oldfashioned "HTMLArea-" way.
I have these functions in the other iframe :
<script>
function getinnet() { // get the html in the editor
var D = parent.frames['editor'].editor.getInnerHTML();
// do something with D
}
function replace() { // replace selection with "blablabla"
var D = 'blablabla';
parent.frames['editor'].editor.insertHTML("blablabla");
}
function fill() { // fill the editor with "blablabla"
var D = 'blablabla';
parent.frames['editor'].editor.setHTML("blablabla");
}
</script>
which I control with these buttons :
<input type="button" value="get" onclick="getinnet();">
<input type="button" value="insert" onclick="replace();">
<input type="button" value="fill" onclick="fill();">
but again this only works when I load Xinha the old fashioned way, using "editor = new HTMLArea("ta"); editor.generate();".
Can anyone tell me the name(s) the editor(s) get when we load Xinha the new way, with "HTMLArea.startEditors(xinha_editors);" ? I don't know how to reach them.
Cheers,
Ecco
Offline
Fantastic, many thanks.
If you're working with many documents like I do, it really saves time to just give and take Xinha the content instead of constantly reloading the editor. So write it down people
var D = parent.xinha_editors.myTextArea.getInnerHTML();
Offline
Pages: 1