Quantcast
Channel: code – Adafruit Industries – Makers, hackers, artists, designers and engineers!
Viewing all articles
Browse latest Browse all 233

Improving the user experience of code blocks @peduarte

$
0
0

Pedro Duarte posts about how to highlight various blocks of code in a program:

I’ve been exploring ways to improve the user experience of code blocks.

I’ve been spending a lot of time writing documentation for the Modulz products. Specifically for Stitches and Radix. And I wanted more than just pretty colors.

This was my wishlist:

  • Syntax highlight
  • Apply multiple themes
  • Highlight specific lines
  • Highlight specific words
  • Interact with the content
  • Make specific words link to other pages
  • Show line numbers
  • Make it collapsible/expandable
  • Render a preview

In this post, I’ll share with you how I built a custom code block component.

See the methodology used in the post here.


Viewing all articles
Browse latest Browse all 233

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>