Add line highlighting to embed


#1

I’m really enjoying the embed feature.

It’d be a nice addition if we could pass a comma separated list of line numbers to highlight.

https://glitch.com/embed/#!/embed/peaceful-missile?path=src/index.html&highlights=10,11,12 <— like this”

Here’s an example implementation using CodeMirror:


#2

Great suggestion, thanks Matias.


#3

Is it implanted in Glitch yet?


#4

Hey folks, this has been implemented in embeds now!

The help article describing customizing embeds has been updated, but in short, add a comma-separated list of lines to highlight to the highlights url parameter: &highlights=2,4,6,8 will highlight lines 2, 4, 6, and 8 of the selected source file.

Happy Glitching!