Code Block Syntax Highlighting

Great news! I canceled my subscription months ago as I got sick of not having syntax highlighting… I may come back if it’s implemented.

I would like to add a few:

Ruby
Bash
Markdown
json
yaml

I would think a good starting list would be similar to the list of ‘common’ languages supported by highlight.js https://highlightjs.org/static/demo/#common

It would also be nice to be able to select from a few themes possibly… Or even just dark and light to start with.

1 Like

Thanks everyone, this is super helpful! Please keep any other ideas you have coming :slight_smile:

1 Like

Why not support “all”.

There are already great frameworks out there that are essentially plug and play, that can handle syntax highlighting out of the box.
Prismjs being a popular one, supports over 200 languages.

You guys don’t have to reinvent the wheel, its non-trivial idea that simply supporting this simple idea of syntax highlighting should be a greater attractor for coders/developers to use coda, means more potential subscriptions. Don’t know how this was not considered by your sales or marketing team, missed opportunity.

3 Likes

+1 same here. I am currently checking, if it is worth switching from Notion (even ClickUp) to Coda, but without syntax hignlighting. mm… it stops somehow the flow of switching over for now.

1 Like

Yesss… I totally agree

1 Like

I don’t understand why we have to choose a few languages. Why not at least support all the languages offered by competing products(confluence, notion…), or at least extract the major programming languages from github or search engines? I don’t know if it’s a proper product design process to ask for customer feedback on such a small detail. It’s bad enough that Markdown-based documentation tool still doesn’t support syntax highlighting, but you’re trying to take a passive approach to that problem.

1 Like

Thanks for the feedback! The team’s goal with this question is to determine which languages are the highest priority for our community, so we can get that functionality in your hands sooner. After an initial launch, we often scope improvements and add-ons to highly requested features like these and we’ll make sure to support a range of common languages.

2 Likes

Dear Coda Team!
For such simple yet important features like Coda Block Syntax Highlighting or a Delete option in the Context menu for all blocks or Highlighting for paragraphs etc. - please just have a look at Nimbus Platform - here everything is already realized what is needed for comfortable editing.
Btw, I know Nimbus very well, but currently prefer to work with Coda because it’s general concept fits my needs better.

2 Likes

C# please. The lack of this feature of the one thing that stops me from recommanding Coda to my company, which is a software company… Also, apps like Notion and Slack have it, some people expect it to be a basic feature.

1 Like

It’s ironic that a no-code tool has so much demand from its community to display code.

6 Likes

Great news! This feature, code syntax highlighting, is now in beta!

Initially, this new styling option will only apply to new code blocks, not existing blocks. Once you sign up for the beta, we will turn on this ability for new code blocks in the next couple weeks. As a reminder, beta features are an early version of a feature we look to test & gather feedback from our community on before rolling out more broadly to everyone. We look forward to hearing your feedback!

Sign up here: Code syntax highlighting beta

5 Likes

Great news, I’m looking forward to testing it out!

Hey Teresa,

I’ve been playing with this and its a great way to also give documentation a little bit of coloring.

However when I lock the page I can see that the code block is still editable… I would suggest that this is also locked like other Coda elements to reduce staff causing trouble :smiley:

Locked page but UI still present in top right:

1 Like

Thanks @Harry_Roper ! This is now fixed :slight_smile: Please let me know if you have any other feedback!

1 Like

Noticed how every line in the the code blocks is treated as its own <code/> element when hitting enter in the code block, that definitely doesn’t help with implementing syntax highlighting.

A code block should always be one <code/> element.
Regardless of whenever enter is used, shouldn’t have to use shift enter to create line breaks without triggering a new content block, whilst inside a code block.

Thanks for sharing this request! We’ve been working on improving Coda’s code block and I’m happy to share that we’ve now launched new code blocks that support syntax formatting for nearly 100 languages!

You can try it out by typing /code block in your doc — let us know what you think!

1 Like