attributes are editable for readonly elements

Oxygen general issues.
DirkGGT
Posts: 2
Joined: Fri Mar 15, 2024 1:52 pm

attributes are editable for readonly elements

Post by DirkGGT »

Using an AuthorNodeCssCustomizer, I have made certain elements of a DITA file readonly by setting

Code: Select all

styles.setProperty(Styles.KEY_EDITABLE, Boolean.valueOf(editable));
This works pretty good: editing the element's content is not possible, and everything in the attributes view is grayed out. When I doubleclick the element, the "Generate Unique ID Value" button in the in-place attributes editor is also grayed out. BUT: it is still possible to manually enter a new value in the input field next to it. Is there a reason for this inconsistency, or is this a bug?
Following this suggestion by Radu, I implemented a CustomAttributeValueEditor, but this does not help either, because it only takes effect after clicking the "Generate Unique ID Value" button, which is grayed out anyway on readonly elements.
As a workaround, I'm testing with an AuthorAttributesDisplayFilter to filter unwanted attributes. That's okay for me, but I still think that attributes of readonly elements should not be editable in the in-place attributes editor.

Greetings,
Dirk