react-codemirror icon indicating copy to clipboard operation
react-codemirror copied to clipboard

Highlight specific text inside a code

Open ameya730 opened this issue 2 years ago • 1 comments

Hi, I am using react-codemirror to show case php code in my application. Is it possible to highlight specific text in the code ?

Example: In the below code, is it possible to highlight echo with a yellow background

<?php
$colors = array("red", "green", "blue", "yellow");

foreach ($colors as $value) {
    echo "value";
}

ameya730 avatar Jun 16 '22 09:06 ameya730

@ameya730 https://codemirror.net/examples/lang-package/

jaywcjlove avatar Jun 16 '22 14:06 jaywcjlove