HTML exporter and expand macro

Comments

7 comments

  • Avatar
    Nils Bier

    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.vm

    See 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

  • Avatar
    Kirstin Seidel-Gebert

    Thanks, Nils.
    I think we won't go so far as to editing the export templates right now.

    I was having a look at Scroll HTML exporter for publishing our documentation to a static web site, but it does not seem to be the suitable tool for that.
    I'll try Scroll Remote Publishing instead.

  • Avatar
    George

    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

  • Avatar
    Martin Muzatko (Edited )

    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

  • Avatar
    George

    Hi Martin

    I have an account at your JIRA named "glewe". I cannot view the issue though.

    Best regards,
    George

  • Avatar
    Nils Bier

    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

  • Avatar
    George

    Yep, that works. Thanks.

Please sign in to leave a comment.

Powered by Zendesk