Using "View Results" boxes as in Asciidoctor Syntax Quick Reference

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Using "View Results" boxes as in Asciidoctor Syntax Quick Reference

wimalopaan
Sorry for this dumb question, but I wonder how to use the dynamic "view result" boxes in my documents as in the Asciidoctor Syntax Quick Reference. I tried using the [.result] role attribute, but that didn't do the trick. I looked into the html-source and found some awestruct attributes. Are they relevant. Please give me some advice.

Regards,
 Wilhelm
Reply | Threaded
Open this post in threaded view
|

Re: Using "View Results" boxes as in Asciidoctor Syntax Quick Reference

mojavelinux
Administrator
I've opened an issue to begin exploring this as a sample extension.


The way it's done in the asciidoctor.org website is that I've used Awestruct to add extra JavaScript to the page template. You can see that JavaScript here:


Cédric and Rob have ported this functionality to the Groovy documentation, which you can see here (scroll down until you see the "view example" links):


I recommend communicating in the issue listed above to understand how to implement it on your own docs. It's not something that is provided out of the box in Asciidoctor at the moment.

Cheers,

-Dan


On Thu, Jan 30, 2014 at 5:37 AM, wimalopaan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Sorry for this dumb question, but I wonder how to use the dynamic "view result" boxes in my documents as in the Asciidoctor Syntax Quick Reference. I tried using the [.result] role attribute, but that didn't do the trick. I looked into the html-source and found some awestruct attributes. Are they relevant. Please give me some advice.

Regards,
 Wilhelm


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Using-View-Results-boxes-as-in-Asciidoctor-Syntax-Quick-Reference-tp1333.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Using "View Results" boxes as in Asciidoctor Syntax Quick Reference

wimalopaan
Thank you for the reply.

Is it posible to include the view-results.js somehow?

Reply | Threaded
Open this post in threaded view
|

Re: Using "View Results" boxes as in Asciidoctor Syntax Quick Reference

mojavelinux
Administrator

Yes, either using docinfo or a post processor extension.

Reply | Threaded
Open this post in threaded view
|

Re: Using "View Results" boxes as in Asciidoctor Syntax Quick Reference

denis
Hi !

This post is almost 3 years old...
Is there a simple way to use this view-result now ?

Thank for your response !
Denis
Reply | Threaded
Open this post in threaded view
|

Re: Using "View Results" boxes as in Asciidoctor Syntax Quick Reference

mojavelinux
Administrator

On Sat, Aug 19, 2017 at 7:24 AM, denis [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi !

This post is almost 3 years old...
Is there a simple way to use this view-result now ?

Thank for your response ?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Using-View-Results-boxes-as-in-Asciidoctor-Syntax-Quick-Reference-tp1333p5856.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Using "View Results" boxes as in Asciidoctor Syntax Quick Reference

denis

Thanks !