Display setting for read-only files?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Display setting for read-only files?
Hello,
We have multiple versions of Oxygen (17, 21, 22, 23, and 24).
In Oxygen 17, when it opens a file that is read-only, the file is displayed as grayed-out:
Is there a setting in Oxygen we can use to get read-only to display in gray?
Thank you,
Will
We have multiple versions of Oxygen (17, 21, 22, 23, and 24).
In Oxygen 17, when it opens a file that is read-only, the file is displayed as grayed-out:
image.png
And when it is not read-only, it is displayed as white:
image.png
For Oxygen 21, 22, 23, and 24, we don't have that same behavior.Is there a setting in Oxygen we can use to get read-only to display in gray?
Thank you,
Will
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display setting for read-only files?
Hi Will,
As far as I remember and from what I tested, Oxygen 17 has no feature of showing a file grayed out when it is marked as read-only on disk or in the CMS.
You seem to be using the SDL connector plugin with Oxygen, I suspect this is a feature of that connector plugin and if it does not work in more recent Oxygen versions it's either because they removed that feature or the feature stopped working. Maybe you can ask SDL about this as we do not control their connector's functionality.
Regards,
Radu
As far as I remember and from what I tested, Oxygen 17 has no feature of showing a file grayed out when it is marked as read-only on disk or in the CMS.
You seem to be using the SDL connector plugin with Oxygen, I suspect this is a feature of that connector plugin and if it does not work in more recent Oxygen versions it's either because they removed that feature or the feature stopped working. Maybe you can ask SDL about this as we do not control their connector's functionality.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Re: Display setting for read-only files?
Hi Radu,
Thanks for your response.
Is there an API in Oxygen to control the background color of the Author tab like that? We might be able to make something of our own for later versions.
We appreciate the help.
Will
Thanks for your response.
Is there an API in Oxygen to control the background color of the Author tab like that? We might be able to make something of our own for later versions.
We appreciate the help.
Will
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Re: Display setting for read-only files?
To clarify - only one team uses SDL, and they are on Oxygen 17.
Other teams using later versions of Oxygen do not use SDL, so we are trying to figure out a solution for them to have the same functionality.
If there is an API to control background color in the Author tab, we can do a custom plugin for them. But, I've not yet found anything in the Javadoc that sounds like it controls the background color on the Author tab:
https://www.oxygenxml.com/InstData/Editor/SDK/javadoc/
Thanks again.
Other teams using later versions of Oxygen do not use SDL, so we are trying to figure out a solution for them to have the same functionality.
If there is an API to control background color in the Author tab, we can do a custom plugin for them. But, I've not yet found anything in the Javadoc that sounds like it controls the background color on the Author tab:
https://www.oxygenxml.com/InstData/Editor/SDK/javadoc/
Thanks again.
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display setting for read-only files?
Hi,
To change the background color of the Author page depending on a certain read-only flag I would probably attempt something like this:
1) A DITA framework configuration extension which adds a custom CSS stylesheet:
https://blog.oxygenxml.com/topics/customizeDITACSS.html
The CSS could have a selector like:
The SDL integration has a DITA framework extension.
2) An Oxygen Workspace Access plugin which adds a listener and when an XML document opens in the Author mode, it sets a certain pseudo class property on the root element. Something like:
https://www.oxygenxml.com/doc/versions/ ... lugin.html
If you do not want to create a DITA framework extension, an alternative to (1) would be to provide a CSS directly as a plugin extension:
https://www.oxygenxml.com/doc/versions/ ... nsion.html
Regards,
Radu
To change the background color of the Author page depending on a certain read-only flag I would probably attempt something like this:
1) A DITA framework configuration extension which adds a custom CSS stylesheet:
https://blog.oxygenxml.com/topics/customizeDITACSS.html
The CSS could have a selector like:
Code: Select all
:root:read-only{
background-color:red;
}
2) An Oxygen Workspace Access plugin which adds a listener and when an XML document opens in the Author mode, it sets a certain pseudo class property on the root element. Something like:
Code: Select all
@Override
public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
pluginWorkspaceAccess.addEditorChangeListener(new WSEditorChangeListener() {
public void editorOpened(URL editorLocation) {
WSEditor editorAccess = pluginWorkspaceAccess.getEditorAccess(editorLocation, PluginWorkspace.MAIN_EDITING_AREA);
WSEditorPage currentPage = editorAccess.getCurrentPage();
if(currentPage instanceof WSAuthorEditorPage) {
WSAuthorEditorPage authorPage = ((WSAuthorEditorPage)currentPage);
if(!authorPage.isEditable()) {
authorPage.getDocumentController().setPseudoClass("read-only", authorPage.getDocumentController().getAuthorDocumentNode().getRootElement());
}
}
};
}, PluginWorkspace.MAIN_EDITING_AREA);
}
If you do not want to create a DITA framework extension, an alternative to (1) would be to provide a CSS directly as a plugin extension:
https://www.oxygenxml.com/doc/versions/ ... nsion.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 168
- Joined: Fri Feb 28, 2020 4:02 pm
Re: Display setting for read-only files?
Post by vishwavaranasi »
Thanks Radu ,
We have implemented this by adding a new style class file with the the style below which is there in the DITA framework of our custom frameworks extension.
custom.css
this works fine for the topics/concepts/..
but the same css file custom.css copied to DITAMAP framework extension , this looks applying the BG color but it is breaking the other CSS Styles of a MAP (bookmap) , i mean when the bookmap file is not read-only OR read-only the other styles are missing.
here is attached for read-only file got applied with BG color
We have implemented this by adding a new style class file with the the style below which is there in the DITA framework of our custom frameworks extension.
custom.css
Code: Select all
:root:read-only{
background-color:#C0C0C0;
}
but the same css file custom.css copied to DITAMAP framework extension , this looks applying the BG color but it is breaking the other CSS Styles of a MAP (bookmap) , i mean when the bookmap file is not read-only OR read-only the other styles are missing.
here is attached for read-only file got applied with BG color
image.png
here is attached for a not read-only and the original styples of DITAMAP before we added the custom syle for BG color
image.png
You do not have the required permissions to view the files attached to this post.
Thanks,
vishwa
vishwa
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display setting for read-only files?
Hi,
Does your custom CSS contain more content than what you pasted above?
So you have this problem for the DITA Map rendering even if you comment out the Java code which sets the pseudo class on the root element "authorPage.getDocumentController().setPseudoClass" in the plugin, right?
In the Oxygen Preferences->"Document Type Associations" page you created an extension of the "DITA Map" framework, right? And in that framework extension in the "Author->CSS" tab you added a reference to your custom CSS, right?
So you did something probably similar to this article:
https://blog.oxygenxml.com/topics/customizeDITACSS.html
When you added a reference to your custom CSS you also have the option to specify a title (and you should leave that empty) and there is also an "Alternate" checkbox, you need to leave that unchecked.
Regards,
Radu
Does your custom CSS contain more content than what you pasted above?
So you have this problem for the DITA Map rendering even if you comment out the Java code which sets the pseudo class on the root element "authorPage.getDocumentController().setPseudoClass" in the plugin, right?
In the Oxygen Preferences->"Document Type Associations" page you created an extension of the "DITA Map" framework, right? And in that framework extension in the "Author->CSS" tab you added a reference to your custom CSS, right?
So you did something probably similar to this article:
https://blog.oxygenxml.com/topics/customizeDITACSS.html
When you added a reference to your custom CSS you also have the option to specify a title (and you should leave that empty) and there is also an "Alternate" checkbox, you need to leave that unchecked.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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