Custom CSS not displaying in Author view, DITA
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 17
- Joined: Wed Jan 25, 2023 1:15 am
Custom CSS not displaying in Author view, DITA
Hello,
I'm trying to add a custom CSS for Oxygen's Author view, and am following the steps in the "Customizing the DITA Visual Editing Experience" topic (https://blog.oxygenxml.com/topics/customizeDITACSS.html). However, Oxygen is not applying the CSS in Author view.
Here's how I handled the steps in the "Customizing the DITA Visual Editing Experience" topic:
steps 1-2: I created a directory named C:\Users\szabog\Documents\manuals\DITA_Curtis-Instruments\oxygen_resources\custom_frameworks\Curtis-DITA_extension. I then saved the CSS to that directory.
Step 3: I specified the custom_frameworks directory created in the previous step. See the attached oxygen_issue_1-8-24_step-3_add-framework.png.
I'm not sure what I am doing wrong, and would appreciate help!
I'm trying to add a custom CSS for Oxygen's Author view, and am following the steps in the "Customizing the DITA Visual Editing Experience" topic (https://blog.oxygenxml.com/topics/customizeDITACSS.html). However, Oxygen is not applying the CSS in Author view.
Here's how I handled the steps in the "Customizing the DITA Visual Editing Experience" topic:
steps 1-2: I created a directory named C:\Users\szabog\Documents\manuals\DITA_Curtis-Instruments\oxygen_resources\custom_frameworks\Curtis-DITA_extension. I then saved the CSS to that directory.
Step 3: I specified the custom_frameworks directory created in the previous step. See the attached oxygen_issue_1-8-24_step-3_add-framework.png.
oxygen_issue_1-8-24_step-3_add-framework.png
Steps 4-5 - External storage was specified in the custom DocType Associations preferences, the .framework file was created. See the attached oxygen_issue_1-8-24_steps-4-5_doctype-storage.png.
oxygen_issue_1-8-24_steps-4-5_doctype-storage.png
Step 6-7: The CSS file was referenced. See the attached oxygen_issue_1-8-24_steps-6-7_reference-css.png.
oxygen_issue_1-8-24_steps-6-7_reference-css.png
However, when I open a topic based on the document type, the CSS styling is not applied. The current CSS is for testing, it should change the foreground and background colors of all p elements. I've also attached a zip of the custom framework directory.I'm not sure what I am doing wrong, and would appreciate help!
custom_frameworks.zip
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Custom CSS not displaying in Author view, DITA
Hi,
Thanks for also attaching the framework zip.
I added a reference on my side in the Oxygen Preferences->"Document Type Association / Locations" page to the "custom_frameworks" folder you attached. Then I edited in the Oxygen Preferences->"Document Type Association" the "Curtis DITA" framework to look a bit into it.
Here are some problems:
1) The "Association rules" tab that "File name" column should match the name of the XML file, not the name of the DTD system ID referenced inside the XML file.
https://www.oxygenxml.com/doc/ug-editor ... s-tab.html
So I think this is the main problem, when you open an XML document in Oxygen, the application will not match it with the "Curtis DITA" framework.
In the Oxygen main menu "Window->Show view" menu there is a "Properties" view. It's useful to show it because it should show you for each opened XML document what the document type name associated with it is. So you can use the Properties view to double check that your framework will be actually used for an opened XML file.
My advice for you is to leave the "File Name" value to be the default "*".
2) The referece to the CSS in the "Author->CSS" tab looks good.
3) The "Templates" tab, a reference like you added to it:
is not portable. Other colleagues may install Oxygen in other places on their drives.
I would suggest something like this instead:
The "${configured.ditaot.dir}" expands by default to "C:\Program Files\Oxygen XML Editor 26\frameworks\dita\DITA-OT" in your case.
4) Catalogs tab, again here an absolute reference which is not portable:
If the "com.curtis-instruments.dita" plugin was already installed in the "C:\Program Files\Oxygen XML Editor 26\frameworks\dita\DITA-OT" folder, you can see in the same "Catalogs" tab a reference to "${configured.ditaot.dir.url}/catalog-dita.xml". So if the plugin is already installed in the DITA OT, Oxygen will use its mappings without the need to add an extra reference to the catalog.xml from the plugin as the main DITA OT "catalog-dita.xml" will already contain a reference to the plugin's catalog.xml.
A problem with a framework extension which also relies on a DITA OT plugin to be installed is that everybody in the team would need to both:
1) Install the "com.curtis-instruments.dita" DITA OT plugin in the Oxygen "DITA-OT" folder (which may not be easy as they need to run Oxygen as an administrator to make changes to its installation folder:
https://www.oxygenxml.com/doc/versions/ ... lugin.html
2) Install your DITA framework extension folder.
An alternative might be to copy the "DITA-OT" folder from the Oxygen installation "frameworks/dita" folder to the "Curtis-DITA_extension" folder and in the Oxygen Preferences->"DITA" page to refer as a custom DITA OT to the "DITA-OT" bundled with the "Curtis-DITA_extension". In this way the framework extension folder would ship with both the CSS, custom actions and a custom DITA-OT containing your plugin and the other users in your team would not need to install a DITA OT plugin.
Regards,
Radu
Thanks for also attaching the framework zip.
I added a reference on my side in the Oxygen Preferences->"Document Type Association / Locations" page to the "custom_frameworks" folder you attached. Then I edited in the Oxygen Preferences->"Document Type Association" the "Curtis DITA" framework to look a bit into it.
Here are some problems:
1) The "Association rules" tab that "File name" column should match the name of the XML file, not the name of the DTD system ID referenced inside the XML file.
https://www.oxygenxml.com/doc/ug-editor ... s-tab.html
So I think this is the main problem, when you open an XML document in Oxygen, the application will not match it with the "Curtis DITA" framework.
In the Oxygen main menu "Window->Show view" menu there is a "Properties" view. It's useful to show it because it should show you for each opened XML document what the document type name associated with it is. So you can use the Properties view to double check that your framework will be actually used for an opened XML file.
My advice for you is to leave the "File Name" value to be the default "*".
2) The referece to the CSS in the "Author->CSS" tab looks good.
3) The "Templates" tab, a reference like you added to it:
Code: Select all
C:\Program Files\Oxygen XML Editor 26\frameworks\dita\DITA-OT\plugins\com.curtis-instruments.dita\oxygen_templates
I would suggest something like this instead:
Code: Select all
${configured.ditaot.dir}\plugins\com.curtis-instruments.dita\oxygen_templates
4) Catalogs tab, again here an absolute reference which is not portable:
Code: Select all
file:/C:/Program%20Files/Oxygen%20XML%20Editor%2026/frameworks/dita/DITA-OT/plugins/com.curtis-instruments.dita/catalog.xml
A problem with a framework extension which also relies on a DITA OT plugin to be installed is that everybody in the team would need to both:
1) Install the "com.curtis-instruments.dita" DITA OT plugin in the Oxygen "DITA-OT" folder (which may not be easy as they need to run Oxygen as an administrator to make changes to its installation folder:
https://www.oxygenxml.com/doc/versions/ ... lugin.html
2) Install your DITA framework extension folder.
An alternative might be to copy the "DITA-OT" folder from the Oxygen installation "frameworks/dita" folder to the "Curtis-DITA_extension" folder and in the Oxygen Preferences->"DITA" page to refer as a custom DITA OT to the "DITA-OT" bundled with the "Curtis-DITA_extension". In this way the framework extension folder would ship with both the CSS, custom actions and a custom DITA-OT containing your plugin and the other users in your team would not need to install a DITA OT plugin.
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