petersolopov / carbonara

API for carbon
MIT License
125 stars 32 forks source link

Is it possible to highlight parts of text? #25

Open tusharsadhwani opened 2 years ago

tusharsadhwani commented 2 years ago

You can select text before exporting on carbon, like so: carbon (64) Could this be done via the API?

tusharsadhwani commented 2 years ago

There seems to be an alternative way to highlight lines, using the selectedLines query param: https://github.com/carbon-app/carbon/pull/878 It looks like this: carbon (65)

tusharsadhwani commented 2 years ago

Even if query params don't work, it should be possible to just click on the line numbers themselves to highlight them manually.

petersolopov commented 2 years ago

As you mentioned it is not supported in query params. Try this. I'he noted in docs.

I think passing this query param should support in carbon. But yes, hypothetically it can be done manually. Feel free to add pr with this feature.

Pitasi commented 1 year ago

There is the sl query param (eg. https://carbon.now.sh/?sl=3 or https://carbon.now.sh/?sl=3,5)

tusharsadhwani commented 1 year ago

@Pitasi neat, thanks!