@Srid I was under the impression that changing embed-code.tpl
file should change the way code block looks but I don't see any change at all.
Updated ember-code.tpl
:
<div class="py-0.5 mb-3 text-sm" title="${ema:alt}">
<div style="position: relative;">
<button>Copy</button>
<pre><code class="${ema:code:language}" ><ema:code:content /></code></pre>
</div>
</div>
This is how the code block is rendered:
Screenshot-2023-12-12-at-6.14.14-PM.png
As you can see in the inspect element on the right there is no button in the HTML snippet.
embed-*.tpl
are used only for embed wikilinks, cf. ![[..]]
.
For code blocks, see pandoc.tpl
,
image.png
This topic was moved here from #general > [Emanote] Copy button to code blocks by Srid.
It would be nice to consolidate them in one place though, if that's even possible.
Last updated: Nov 15 2024 at 12:33 UTC