Announcement

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

#1 2008-10-26 02:22:45

mark_d_drake
New member
Registered: 2007-09-29
Posts: 4

Content not shown in Xinha Editor when editor is unhidden

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

#2 2008-11-21 11:47:06

mark_d_drake
New member
Registered: 2007-09-29
Posts: 4

Re: Content not shown in Xinha Editor when editor is unhidden

No ideas ?

Offline

Board footer

Powered by FluxBB