Myriad-Dreamin / shiroa

shiroa is a simple tool for creating modern online books in pure typst.
https://myriad-dreamin.github.io/shiroa/
Apache License 2.0
204 stars 17 forks source link

[Feature Request] Add button to copy code block content #65

Open duskmoon314 opened 1 month ago

duskmoon314 commented 1 month ago

It would be nice to have a button to copy a code block's content like mdBook.


In addition, we can copy content by selecting and using the browser's hotkeys. However, this looks weird, possibly due to many empty elements. There are many span with class typst-content-fallback but have no child elements.

image
Myriad-Dreamin commented 1 month ago

I have no idea to identify the raw blocks in a compiled document. Perhaps we can enhance it when typst provides an IR (the IR for HTML export) containing full information for us.