attributes are editable for readonly elements
Oxygen general issues.
-
- Posts: 2
- Joined: Fri Mar 15, 2024 1:52 pm
attributes are editable for readonly elements
Using an AuthorNodeCssCustomizer, I have made certain elements of a DITA file readonly by setting
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
Code: Select all
styles.setProperty(Styles.KEY_EDITABLE, Boolean.valueOf(editable));
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
-
- Posts: 1
- Joined: Tue Feb 18, 2025 10:18 am
- Location: https://driftboss2.org
- Contact:
Re: attributes are editable for readonly elements
Post by CharlotteMurphy »
Implementing an AuthorAttributesDisplayFilter can hide specific attributes from the Attributes view, effectively preventing their modification. This approach, however, removes the attribute from view entirely, which may not be ideal if you want the attribute to be visible but uneditable.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: attributes are editable for readonly elements
Hi,
One would probably need to have a content completion configuration XML file to state that values for certain attribute are not editable:
https://www.oxygenxml.com/doc/versions/ ... osals.html
I think it's something like this:
Regards,
Radu
One would probably need to have a content completion configuration XML file to state that values for certain attribute are not editable:
https://www.oxygenxml.com/doc/versions/ ... osals.html
I think it's something like this:
Code: Select all
<valueProposals path="element/@value" editable="false"/>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service