Possible to customize the warning messages in Oxygen?
-
- Posts: 33
- Joined: Wed Dec 20, 2017 9:56 pm
Possible to customize the warning messages in Oxygen?
We have a use case where we would like to customize the warning messages displayed in Oxygen, when a user clicks on a link that cannot open.
Currently the message is:
Description: :Cannot open the link. The URL is not specified.
Severity: Warning
To change the text in the "Description" field, would it require an simple change in the framework, or something more complicated? Thanks.
Currently the message is:
Description: :Cannot open the link. The URL is not specified.
Severity: Warning
To change the text in the "Description" field, would it require an simple change in the framework, or something more complicated? Thanks.
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Possible to customize the warning messages in Oxygen?
Post by sorin_carbunaru »
Hello,
Unfortunately there is no way to customize that message... How exactly would you want to customize it? I would like to understand your use case
.
All the best wishes,
Sorin Carbunaru
oXygen XML
Unfortunately there is no way to customize that message... How exactly would you want to customize it? I would like to understand your use case

All the best wishes,
Sorin Carbunaru
oXygen XML
-
- Posts: 33
- Joined: Wed Dec 20, 2017 9:56 pm
Re: Possible to customize the warning messages in Oxygen?
Hi Sorin,
Thanks for your reply.
My use case is, when the XIncluded doc content is in XMLs under certain file directories, I'd like to prevent the Oxygen users from following the xi:include links to open and edit them. One option would be to customize the CSS like this:
xi|include[href^="urn:mydomain:specialDir"]:before {
link: "" !important;
}
Now if a user click on the link from Oxygen's Author view, it displays the warning message aforementioned. It would be nice if we can let the warning message say something like:
Description: :Do not edit the file under /mydomain/specialDir. Your changes there will not be saved in the version control system.
Severity: Warning
Thanks for your reply.
My use case is, when the XIncluded doc content is in XMLs under certain file directories, I'd like to prevent the Oxygen users from following the xi:include links to open and edit them. One option would be to customize the CSS like this:
xi|include[href^="urn:mydomain:specialDir"]:before {
link: "" !important;
}
Now if a user click on the link from Oxygen's Author view, it displays the warning message aforementioned. It would be nice if we can let the warning message say something like:
Description: :Do not edit the file under /mydomain/specialDir. Your changes there will not be saved in the version control system.
Severity: Warning
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Possible to customize the warning messages in Oxygen?
Post by sorin_carbunaru »
Hi Charles,
If writing some Java code is an option, you could create a plugin that makes the files from the special domain read-only, and also set a reason why the document is like that.
For detecting if the current file is "special" and making it read-only, you can do something like this:
Best wishes,
Sorin C.
If writing some Java code is an option, you could create a plugin that makes the files from the special domain read-only, and also set a reason why the document is like that.
For detecting if the current file is "special" and making it read-only, you can do something like this:
Code: Select all
PluginWorkspace pluginWorkspace = PluginWorkspaceProvider.getPluginWorkspace();
// Get the current editor
WSEditor editor = pluginWorkspace.getCurrentEditorAccess(StandalonePluginWorkspace.MAIN_EDITING_AREA);
// Resolve the URN prefix to a URL
URL resolvedURN = pluginWorkspace.getXMLUtilAccess().resolvePathThroughCatalogs(null, "urn:mydomain:specialDir", true , true);
// Check if the current editor contains one of the interesting files
if (editor.getEditorLocation().toExternalForm().startsWith(resolvedURN.toExternalForm())) {
// Make read-only and give a reason. This reason should be rendered when trying to edit the document.
editor.getCurrentPage().setReadOnly("Do not edit!");
}
Sorin C.
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