Page 1 of 1
Prevent deletion of section
Posted: Wed Jan 15, 2020 9:13 am
by JulieP
Is there a way to prevent the deletion of a section or paragraph?
Re: Prevent deletion of section
Posted: Wed Jan 15, 2020 12:05 pm
by Radu
Hi Julie,
If for example you mark that XML element with a certain attribute:
Code: Select all
<p outputclass="read-only">Oil should be changed every 6000 kilometers.</p>
you can set the element as read-only from the CSS:
Code: Select all
p[outputclass='read-only'] {
-oxy-editable:false;
}
but the element will have read-only contents, you will still be able to delete it from the Outline.
If you want something more probably you can use our Java based API to implement an AuthorDocumentFilter:
https://www.oxygenxml.com/InstData/Edit ... ilter.html
or with a schema aware editing handler:
https://www.oxygenxml.com/doc/versions/ ... ndler.html
Regards,
Radu