Prevent deletion of section

<oXygen/> general issues.
Posts: 12
Joined: Sat May 30, 2015 2:18 am

Prevent deletion of section

Post by JulieP » Wed Jan 15, 2020 9:13 am

Is there a way to prevent the deletion of a section or paragraph?

Posts: 7094
Joined: Fri Jul 09, 2004 5:18 pm

Re: Prevent deletion of section

Post by Radu » Wed Jan 15, 2020 12:05 pm

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'] {
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: ... ilter.html

or with a schema aware editing handler: ... ndler.html

Radu Coravu
<oXygen/> XML Editor

Post Reply