HTML exporter and expand macro
Hi all,
we're evaluating Scroll HTML exporter at the moment and I saw that expand macros are generated to the HTML output in an expanded way with the expand text as a heading:
(Sorry, couldn't get the pic smaller :) ).
Is there a way to change this behavior, e.g. by a dedicated template?
We want the expand macro to be expandable on click (best solution) or at least no expand text (second best).
Cheers,
Kirstin
-
Hi Kirstin,
Thanks for contacting us.
Using Scroll HTML Exporter this should be possible, as this supports JavaScript.The expand macro uses some small JavaScript snippet. Using the jQuery library (which is included in the example template already) this can be implemented rather easily (see http://api.jquery.com/slideToggle for further details).
If you have your own template you could try to do the following:
- modify page.vm and either directly add the javascript in a script tag or
- add your own javascript file in atlassian plugin xml as template resource and then link to it in page.vmSee here for example:
https://bitbucket.org/K15t/scroll-html-example-template/src/e864132739d57267cb5e3ab693507a4a8a4655ed/src/main/resources/template/page.vm?at=master#cl-23 (line 23)
https://bitbucket.org/K15t/scroll-html-example-template/src/e864132739d57267cb5e3ab693507a4a8a4655ed/src/main/resources/atlassian-plugin.xml?at=master#cl-77 (line 77)Please let me know if that helps to get you on the right track. I'll create an internal task to document this and we'll update this forum thread once the new doc is live.
Best,
Nils -
Hi Nils,
we would also like the Expand macro to work in the exported HTML. You speak of an exmaple template that has jQuery included, however, the default template that we see does not have that.
Is there a collection of other example templates somewhere? Some that we can install as a plugin? Does one of them support the expand/collapse feature in the exported HTML?
Best regards,
George -
Hello George.
I investigated the issue a little further.
First of all, I recorded the bug here: https://k15t.jira.com/browse/EXP-1290
At the moment, it is impossible to have working expand macros in the exported HTML. At least in the content. Because the content is rendered once server-side and then output to the HTML Export. This approach swallows the required markup, needed to have expand macros work. In the past, this worked well, but we decided to move on with this solution. We are going to fix this, but we don't have a time-plan for that yet.
Please sign up at https://k15t.jira.com/secure/Signup!default.jspa to watch, comment on or vote for this issue. We'll then send a notification for every status update.
Best,
Martin -
Hi George,
Please try the link again, the initial answer had a link to our internal project, instead of the public EXP project.
You should have access to https://k15t.jira.com/browse/EXP-1290 - no?Cheers,
Nils
Please sign in to leave a comment.
Comments
7 comments