[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to tell `org-html-link' to create a link with some HTML class?
From: |
Jens Lechtenboerger |
Subject: |
Re: How to tell `org-html-link' to create a link with some HTML class? |
Date: |
Tue, 20 Jun 2023 08:07:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On 2023-06-20, Marcin Borkowski wrote:
> Dear Orgers,
>
> as I mentioned some time ago, I'm writing a custom exporter (actually,
> a very thin wrapper around the HTML exporter). I'd like `org-html-link'
> to add some class to the links it generates. Is that possible?
Dear Marcin,
yes, that’s possible, ":attr_html" is read in `org-html-link'. You
have to set that in your code, see [1] for an example for classes in
my reveal.js backend.
Briefly, with `elem' being the link, I use this:
`(org-element-put-property elem :attr_html (list newattrs))'
Best wishes
Jens
[1] https://gitlab.com/oer/org-re-reveal/-/blob/master/org-re-reveal.el#L2167