You are not logged in.
I have some wierd behavoir going on
Here the code I'm executing
function enableWikiEditor() {
  var viewerPanel         = document.getElementById('wikiViewer');
  var viewerControls      = document.getElementById('wikiViewerControls');
  var editor              = xinha_editors.xinhaWiki;
  var editorPanel         = document.getElementById('wikiEditor');
  var editorControls      = document.getElementById('wikiEditorControls');
  enableEditor(viewerPanel, viewerControls, editorPanel, editorControls, editor);
}
function enableEditor(viewerPanel, viewerControls, editorPanel, editorControls, editor) {
  // Switch to Editing Mode. Show the editorPanel Division and hide the viewer divisions
  
  viewerPanel.style.display = "none";
  viewerControls.style.display = "none";
  editorPanel.style.display = "block";
  editorControls.style.display = "block";
  editor.activateEditor();    
  editor.setHTML(editor.inwardHtml(viewerPanel.innerHTML));
  // alert(editor.outwardHtml(editor.getHTML()));
  editor.focusEditor();
  editor.scrollToElement();
// dumpHTML(document.getElementById('pageContent').innerHTML);
}
The conntent of the DIV "viewer" is
<p xmlns="http://www.w3.org/1999/xhtml">Hello World</p>
When the DIV editor is displayed the Xinha Editor appears as expected but appear to have no content. If I zoom to full page, then the content appears, and once I exit full page mode the content is still present. If I uncomment the alert then the content of the alert box is as expected.
Totally confused as to what is going on here. The only "non-standard" thing in my code is I'm trying to construct the Xinha instance after the page has loaded. My page content is all dynamically constructed using client side XSLT and innerHTML. I call init_xinha() manually once the innerHTML has been loaded.
Offline
No ideas ?
Offline