You are not logged in.
Hi,
I have a dynamic application I am trying to build and it uses tabs with an editor. I really like this one because it's open source so I was wondering if anybody knew if there was a way to refresh the editor when a surounding div was set to display:block from display:none. I know that using the startEditors adds another editor and it works good but it reinitiates the entire thing so now there are two. I need a way to refresh or kill an old editor session. anyideas?
<a href="javascript:void(0);" onclick="javascript:document.getElementById('edit').style.display = 'block';HTMLArea.startEditors(xinha_editors);">show</a>
<div style="display:none;" id="edit">
Textarea here
</div>
Offline
I did something like this, too, and there was no problem (if I remember right).
What do you mean with refresh? Is the editor not working when you show the tab? maybe you have to do sth. like this:
var editor = xinha_editors.myEditorId;
editor.deactivateEditor();
document.getElementById('edit').style.display = 'block';
editor.activateEditor();
Offline
Yes That's exactly what I want to do.
Thanks, P
Offline
More Specifically I had to do this
code...
HTMLArea.startEditors(xinha_editors);
self.setTimeout("hideeditor()",100);
}
window.onload = xinha_init;
</script>
<script type="text/javascript">
function showeditor(){
var editor = xinha_editors.myTextArea;
document.getElementById('edit').style.display = 'block';
editor.activateEditor();
}function hideeditor(){
var editor = xinha_editors.myTextArea;
editor.deactivateEditor();
document.getElementById('edit').style.display = 'none';
}
</script>
Offline