Hiding folded placeholder
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
Hiding folded placeholder
Hi,
I have a custom framework with foldable elements and in the desktop version everything looks fine. But in teh web author there is the text "(Folded)" shown below by non-foldable child when the element is folded. How can I get rid of this? I could not find any documentation about a pseudo-class ":folded" (only a feature request) or something like that!?
Thans and regards,
Patrik
I have a custom framework with foldable elements and in the desktop version everything looks fine. But in teh web author there is the text "(Folded)" shown below by non-foldable child when the element is folded. How can I get rid of this? I could not find any documentation about a pseudo-class ":folded" (only a feature request) or something like that!?
Thans and regards,
Patrik
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Hiding folded placeholder
Post by cristi_talau »
Hello,
Web Author's default styling is different from the one in the desktop editor. I also found the feature request to add a pseudo-class for folded elements and I added your vote to it.
A non-API way to get rid of that text is to add a custom CSS to Web Author [1] and to add the following selector:
Note that this code is not guarateed to work in future versions of Web Author. However, by that point the pseudo-class may be already added.
Best,
Cristian
[1] https://www.oxygenxml.com/doc/versions/ ... 3j_p1x_3bb
Web Author's default styling is different from the one in the desktop editor. I also found the feature request to add a pseudo-class for folded elements and I added your vote to it.
A non-API way to get rid of that text is to add a custom CSS to Web Author [1] and to add the following selector:
Code: Select all
.folded[folded-placeholder]:after, .non-folded-child[folded-placeholder]:after {
display: none !important;
}
Best,
Cristian
[1] https://www.oxygenxml.com/doc/versions/ ... 3j_p1x_3bb
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
Re: Hiding folded placeholder
Hi Cristian,
thanks for the hint. Unfortunately adding a custom css seems not to be as easy as it sounds.
Inspired by the web-author-sample-plugins I tried it with this plugin.xml:
But I got Exception java.lang.ClassNotFoundException (got the same trying to use the sample plugin - added an issue there).
So I really have to write some java code just to add my css file?
Regards,
Patrik
thanks for the hint. Unfortunately adding a custom css seems not to be as easy as it sounds.
Inspired by the web-author-sample-plugins I tried it with this plugin.xml:
Code: Select all
<plugin id="hide-folded-placeholder"
name="hide-folded-placeholder"
description="Hides the placeholder when an element is folded"
version="1.0"
vendor="GDV DL">
<extension type="WebappCSSResource" href="hide-folded-placeholder.css"/>
</plugin>
So I really have to write some java code just to add my css file?
Regards,
Patrik
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Hiding folded placeholder
Post by cristi_talau »
Hello,
The "WebappCSSResource" extension point was added in version 21.1.1. Prior to this release you have to use JS to load the CSS and the "WebappStaticResourcesFolder" extension point. You can see some examples here [1] and here [2].
Best,
Cristian
[1] https://github.com/oxygenxml/web-author ... in.xml#L18
[2] https://github.com/oxygenxml/web-author ... ugin.js#L3
The "WebappCSSResource" extension point was added in version 21.1.1. Prior to this release you have to use JS to load the CSS and the "WebappStaticResourcesFolder" extension point. You can see some examples here [1] and here [2].
Best,
Cristian
[1] https://github.com/oxygenxml/web-author ... in.xml#L18
[2] https://github.com/oxygenxml/web-author ... ugin.js#L3
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
Re: Hiding folded placeholder
Hi Christian,
thanks for the explanation. However, I still fail getting it to work.
my files:
plugin.xml
web/plugin.js
resources/hide-folded-placeholder.css
When installing the plugin I can't activate it and it shows two times "Exception java.lang.ClassNotFoundException".
Any hints on what I did wrong or was missing?
Thanks and regards,
Patrik
thanks for the explanation. However, I still fail getting it to work.
my files:
plugin.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plugin SYSTEM "../plugin.dtd">
<plugin id="hide-folded-placeholder"
name="Hide Folded Placeholder"
description="Hides the placeholder for folded elements."
version="1.0"
vendor="GDV DL">
<extension type="WebappStaticResourcesFolder" path="resources/" href="man-sp/"/>
</plugin>
web/plugin.js
Code: Select all
(function () {
var cssFile;
cssFile = goog.dom.createDom('link');
cssFile.rel = "stylesheet";
cssFile.type = "text/css";
cssFile.href = "../plugin-resources/man-sp/hide-folded-placeholder.css";
goog.dom.appendChild(document.head, cssFile);
});
resources/hide-folded-placeholder.css
Code: Select all
.folded[folded-placeholder]:after, .non-folded-child[folded-placeholder]:after {
display: none !important;
}
When installing the plugin I can't activate it and it shows two times "Exception java.lang.ClassNotFoundException".
Any hints on what I did wrong or was missing?
Thanks and regards,
Patrik
-
- Posts: 81
- Joined: Wed Jul 20, 2016 8:22 am
Re: Hiding folded placeholder
Post by mihai_coanda »
Hello Patrik,
I recreated the plugin based on your information and deployed it into the WebAuthor.
The function from your javascript code was not called, only declared so i changed it to (only added () at the end to call it) :
It work well on my side.
This plugin should not shows "Exception java.lang.ClassNotFoundException" as it does not contain any java code and does not declare any java extension in the plugin.xml descriptor.
On what Web Author version and build number are you working on and what are the complete exceptions the plugin displays (the classes it tries to load and fails are of interest) ?
It would be great if you could try remove and redeploy the plugin :
Michael
I recreated the plugin based on your information and deployed it into the WebAuthor.
The function from your javascript code was not called, only declared so i changed it to (only added () at the end to call it) :
Code: Select all
(function () {
var cssFile;
cssFile = goog.dom.createDom('link');
cssFile.rel = "stylesheet";
cssFile.type = "text/css";
cssFile.href = "../plugin-resources/man-sp/hide-folded-placeholder.css";
goog.dom.appendChild(document.head, cssFile);
})();
This plugin should not shows "Exception java.lang.ClassNotFoundException" as it does not contain any java code and does not declare any java extension in the plugin.xml descriptor.
On what Web Author version and build number are you working on and what are the complete exceptions the plugin displays (the classes it tries to load and fails are of interest) ?
It would be great if you could try remove and redeploy the plugin :
- from the admin page delete the plugin
- restart the WebAuthor
- reinstall the plugin archive containing only the files that you mentioned with the exact content
- restart the WebAuthor
Michael
Michael
https://www.oxygenxml.com
https://www.oxygenxml.com
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
Re: Hiding folded placeholder
Hi Michael,
thanks a lot. I followed your steps and now it works.
Just for completion: the version shown on the license page: oXygen XML Web Author: 21.1, build 2019052218/2019052201
On the plugin page it did not give any additional information beside the exception.
(That's only version I could find, so I hope it's the version of the installed Software not from the license.)
Thanks and regards,
Patrik
thanks a lot. I followed your steps and now it works.
Just for completion: the version shown on the license page: oXygen XML Web Author: 21.1, build 2019052218/2019052201
On the plugin page it did not give any additional information beside the exception.
(That's only version I could find, so I hope it's the version of the installed Software not from the license.)
Thanks and regards,
Patrik
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