Readonly mode

  • 3 replies.
  • This is not yet resolved.
  • This question was started by Huub.
  • Last post by Carl.
Huub
user
April 29th 2009
Hi,

I am investigating your local host trial version Xopus 3.2.18 and I am wandering if there is a way to have your editor run in a completely readonly mode for both IE7+ and FF3+.

I have tried to do this by configuration, using the subcanvas property, but then I still could insert content within the editor.

Regards,
Huub Bonarius
Carl
Xopus Team
April 29th 2009
An answer that is perhaps a bit too obvious would be to say that you can transform the XML outside the editor, but if you still want to keep things within Xopus, you could perhaps cancel every event that adds elements or changes things. This would mean loading a different configuration. You could also use that configuration to hide elements and options in the interface.
east
user
May 2nd 2009

give a example

can give a demo?
Carl
Xopus Team
May 4th 2009
A simple Example of preventing changes is the following:

Editor.addEventListener("load",load);

function load(evt)
{
var doc = Editor.getActiveDocument();
doc.addEventListener("XopusBeforeSubtreeModified", doNothing);
}

function doNothing(evt)
{
evt.cancelEvent = true;
}

React

HTML will be shown as HTML code.
Linebreaks and Links starting with http:// are automatically resolved