Hide or lock attributes

March 12 2008

  • 1 reply.
  • This question is not yet resolved.
  • This question was started by nils.
  • Last post by Robbert.
nils
member
12 March, 14:14
Hi,
is it possible to hide and/or lock xml attributes to prevent users from accessing and modifying them through the Status bar/Attribute menu item?

I'd like to add ids to text nodes like this:
...
<paragraph id="1">
Lorem ipsum dolor sit amet
</paragraph>
...
Now the user should be able to modify the text whereas the id attribute should be non editable (and hidden if possible..).

Thanks, Nils
Robbert
Xopus Team
12 March, 15:58
Unfortunately, this is not possible. Usually editing such nodes is prevented by keeping an eye on these nodes using the Mutation Events. Have a look at:

http://xopus.com/Documentation/Developer%20Guide/Reference/Xopus%20API/Events.new

You could use XopusBeforeNodeValueModified to check if the target is such attribute, and prevent the change using evt.cancelEvent.


React

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