How To Use Text Filter For Syntax Highlighting

Created on 22 October 2022, about 2 years ago
Updated 23 February 2023, almost 2 years ago

Problem/Motivation

How can I use this filter to highlight my code, so the reader of my coding blog can see the code clearly.

Steps to reproduce


I did check the Codemirror option in Enabled Filters (/admin/config/content/formats/myformat), but what next?

Is that to be used like this?
This is my first paragraph example, and bellow is the code that I would to show to my reader in highlighted format using Codemirror.
(code language="cpp")
int counter = 1;
... so on
(/code)
() changed with <>
This is my second paragraph that explaining the code above line by line.

I don't understand how to use this module to help me hightlight the code text in my Article body. Please help.

💬 Support request
Status

Fixed

Version

1.8

Component

Documentation

Created by

🇮🇩Indonesia Harsikesa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024