Include additional attribute within HTML tag generated

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

Include additional attribute within HTML tag generated

ch007m
Hi,

I don't think that this option is supported natively but I will ask nevertheless the question "Can we include an additional html attribute" with asciidoctor 1.0.4 ?

Asciidoctor supports the notion of role which is helpful to include additional class within the html tag generated

Example :

[role="popuplink"]
.References
* https://website.org/alink.html[]

Result :

<div class="ulist popuplink">
div class="title">References</div><ul><li><p><a href="https://website.org/alink.html"</a></p></li></ul></div>

Based on the same concept, that should be great to have the possibility to include its own attribute.

Example

* link:https://website.org/alink.html[property="audio:myfile.mp3"]

Result :

<a href="" audio="myfile.mp3"/>

Regards,



Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: Include additional attribute within HTML tag generated

mojavelinux
Administrator
This is certainly achievable by tweaking the backend template. Nothing is preventing you from adding the custom properties to the AsciiDoc today and changing the output at a later time.

With that said, it might be useful to consider a general purpose "passthrough" of attributes from AsciiDoc to HTML...perhaps the data attributes in HTML5. That way, at least it's possible to pass data through without always having the requirement of modifying the output templates. This could be very useful for HTML5 applications such as slideshows and such.

Cheers,

-Dan

On Mon, Mar 30, 2015 at 3:55 PM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I don't think that this option is supported natively but I will ask nevertheless the question "Can we include an additional html attribute" with asciidoctor 1.0.4 ?

Asciidoctor supports the notion of role which is helpful to include additional class within the html tag generated

Example :

[role="popuplink"]
.References
* https://website.org/alink.html[]

Result :

<div class="ulist popuplink">
div class="title">References</div><ul><li><p><a href="https://website.org/alink.html"</a></p></li></ul></div>

Based on the same concept, that should be great to have the possibility to include its own attribute.

Example

* link:https://website.org/alink.html[property="audio:myfile.mp3"]

Result :




Regards,



Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard



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: Include additional attribute within HTML tag generated

ch007m
Hi Dan,

I like the idea to propose to use the HTML5 data-xxx attribute(s) as general mechanism supported by asciidoctor. As HTML5 attribute proposes a common "data-" prefix, we could use it like the role for the div classes to pass such information to the converter where every key=value will be used to generate the html syntax data-key1="value" data-key2="value"  ...
The benefit will be that js or jquery specialists will capitalize from that feature to add more animations, ... within the HTML generated.

Regards,

Charles 

On Mon, Mar 30, 2015 at 8:00 PM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is certainly achievable by tweaking the backend template. Nothing is preventing you from adding the custom properties to the AsciiDoc today and changing the output at a later time.

With that said, it might be useful to consider a general purpose "passthrough" of attributes from AsciiDoc to HTML...perhaps the data attributes in HTML5. That way, at least it's possible to pass data through without always having the requirement of modifying the output templates. This could be very useful for HTML5 applications such as slideshows and such.

Cheers,

-Dan

On Mon, Mar 30, 2015 at 3:55 PM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I don't think that this option is supported natively but I will ask nevertheless the question "Can we include an additional html attribute" with asciidoctor 1.0.4 ?

Asciidoctor supports the notion of role which is helpful to include additional class within the html tag generated

Example :

[role="popuplink"]
.References
* https://website.org/alink.html[]

Result :

<div class="ulist popuplink">
div class="title">References</div><ul><li><p><a href="https://website.org/alink.html"</a></p></li></ul></div>

Based on the same concept, that should be great to have the possibility to include its own attribute.

Example

* link:https://website.org/alink.html[property="audio:myfile.mp3"]

Result :




Regards,



Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard



To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Include-additional-attribute-within-HTML-tag-generated-tp2868p2878.html
To unsubscribe from Include additional attribute within HTML tag generated, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: Include additional attribute within HTML tag generated

mojavelinux
Administrator

On Mon, Mar 30, 2015 at 9:00 PM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi Dan,

I like the idea to propose to use the HTML5 data-xxx attribute(s) as general mechanism supported by asciidoctor. As HTML5 attribute proposes a common "data-" prefix, we could use it like the role for the div classes to pass such information to the converter where every key=value will be used to generate the html syntax data-key1="value" data-key2="value"  ...
The benefit will be that js or jquery specialists will capitalize from that feature to add more animations, ... within the HTML generated.

Regards,

Charles 

On Mon, Mar 30, 2015 at 8:00 PM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is certainly achievable by tweaking the backend template. Nothing is preventing you from adding the custom properties to the AsciiDoc today and changing the output at a later time.

With that said, it might be useful to consider a general purpose "passthrough" of attributes from AsciiDoc to HTML...perhaps the data attributes in HTML5. That way, at least it's possible to pass data through without always having the requirement of modifying the output templates. This could be very useful for HTML5 applications such as slideshows and such.

Cheers,

-Dan

On Mon, Mar 30, 2015 at 3:55 PM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I don't think that this option is supported natively but I will ask nevertheless the question "Can we include an additional html attribute" with asciidoctor 1.0.4 ?

Asciidoctor supports the notion of role which is helpful to include additional class within the html tag generated

Example :

[role="popuplink"]
.References
* https://website.org/alink.html[]

Result :

<div class="ulist popuplink">
div class="title">References</div><ul><li><p><a href="https://website.org/alink.html"</a></p></li></ul></div>

Based on the same concept, that should be great to have the possibility to include its own attribute.

Example

* link:https://website.org/alink.html[property="audio:myfile.mp3"]

Result :




Regards,



Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard



To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Include-additional-attribute-within-HTML-tag-generated-tp2868p2878.html
To unsubscribe from Include additional attribute within HTML tag generated, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Include-additional-attribute-within-HTML-tag-generated-tp2868p2880.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--