Disable opening of conrefs when page is not editable
Oxygen general issues.
-
- Posts: 23
- Joined: Sat Mar 08, 2014 12:10 am
Disable opening of conrefs when page is not editable
Hello,
I have a page that is not editable.
authorPage.setEditable(false);
If the DITA document contains conrefs, the user is able to open them. I want to disable the link - preferably without changing the style sheet and preferably through the plugin (not ExtensionBundle).
Ideas?
Thanks,
D
Oxygen 17.0
Plugin
I have a page that is not editable.
authorPage.setEditable(false);
If the DITA document contains conrefs, the user is able to open them. I want to disable the link - preferably without changing the style sheet and preferably through the plugin (not ExtensionBundle).
Ideas?
Thanks,
D
Oxygen 17.0
Plugin
-
- Posts: 9498
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Disable opening of conrefs when page is not editable
Hi Deanna,
There is also a contextual menu action for editing the referenced content which you can remove by setting a popup menu customizer.
Going back to your problem, after you load the XML and call authorPage.setEditable(false); you could also set a pseudo class on the root element like:
Then we need to somehow change the rendering of the reference based on this pseudo style.
You would need a custom CSS content like:
If you want to provide it via a plugin you could add a custom URI resolver:
and when you receive a callback for an input source which has the URI "http://www.oxygenxml.com/extensions/aut ... Custom.css"
try to resolve it to a source which has an URL pointing to a CSS resource with the content I suggested above from the plugin folder.
In Oxygen 17.1 you will be able to contribute directly a custom CSS via a special plugin extension type.
Regards,
Radu
There is also a contextual menu action for editing the referenced content which you can remove by setting a popup menu customizer
Code: Select all
WSAuthorEditorPageBase.addPopUpMenuCustomizer(AuthorPopupMenuCustomizer)
Going back to your problem, after you load the XML and call authorPage.setEditable(false); you could also set a pseudo class on the root element like:
Code: Select all
authorPage.getDocumentController().setPseudoClass("read-only", authorPage.getDocumentController().getAuthorDocumentNode().getRootElement());
You would need a custom CSS content like:
Code: Select all
@namespace oxy "http://www.oxygenxml.com/extensions/author";
:root:read-only oxy|reference:before {
content: "" !important;
}
Code: Select all
ro.sync.exml.workspace.api.util.XMLUtilAccess.addPriorityURIResolver(URIResolver)
try to resolve it to a source which has an URL pointing to a CSS resource with the content I suggested above from the plugin folder.
In Oxygen 17.1 you will be able to contribute directly a custom CSS via a special plugin extension type.
Regards,
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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