Post here questions and problems related to oXygen frameworks/document types.
- Posts: 1
- Joined: Tue Feb 04, 2020 10:16 am
I have this Custom JSOperation script that opens a file from a ditamap to do operations on all topics. But I'd like to be able to open files in read-only mode from the beginning, the setEditable() function works but my content manager requires a check-in/discard (not the case for file with read only permission). Is this possible?
Code: Select all
controller = authorAccess.getWorkspaceAccess().getEditorAccess(hRef);
controllerPage = controller.getCurrentPage();
results = controllerPage.authorAccess.getDocumentController().findNodesByXPath("(//*/row)[last()]", true, true, true);
comp = results.getTextContent();
- Posts: 6916
- Joined: Fri Jul 09, 2004 5:18 pm
We do not have APIs for check in and discard. These are probably actions implemented by the CMS integration plugin installed in Oxygen. So they would probably somehow need to offer you the API to call for these actions.
Maybe you could also try this alternate API we have:
ro.sync.exml.workspace.api.standalone.S ... ], String)
ro.sync.ecss.extensions.api.component.C ... L, Reader)
would load content from the URL (or from the alternative reader) in a component which would have about the same API as an opened editor.
But the component would not show on screen.
I'm not sure though, Oxygen at some point will attempt to retrieve content from that URL, the way in which this retrieval is implemented in the CMS plugin is not controlled by us.
<oXygen/> XML Editor