Skip to content

Copy-code macro

Compare
Choose a tag to compare
@Telumire Telumire released this 05 Jan 16:10
· 33 commits to main since this release
2076cb4

This macro can be used to display a snippet of code with syntax coloring (highlight.js is required) and a copy to clipboard button. You can also display a title and an indicator for the programming language used.

I also included a ViewTemplate ($:/showInfo/code/Stylesheet/ViewTemplate) to use the macro on tiddlers with the following tags :

  • $:/tags/Macro
  • $:/tags/Stylesheet
  • $:/tags/ViewTemplate

Preview