environment:react-codemirror 4.3.2、codemirror 5.65.0、react 17
What I need to do is getting the codemirror object then using doc.markText .etc APIs with lines number as props to make my code section highlight or get some custom styles。
But now I dont know how to use react-codemirror to achieve because first of all I couldnt get the codemirror object
hope for reply :>
环境:react-codemirror 4.3.2、codemirror 5.65.0、react 17 我的需求是 获取到codemirror实例,然后通过doc.markText类似的api 传入行号将我所需要代码片 高亮/加自定义样式。 但我不知道如何使用react-codemirror实现上述操作?拿不到实例~ 期待大佬回答
environment:react-codemirror 4.3.2、codemirror 5.65.0、react 17 What I need to do is getting the codemirror object then using doc.markText .etc APIs with lines number as props to make my code section highlight or get some custom styles。 But now I dont know how to use react-codemirror to achieve because first of all I couldnt get the codemirror object hope for reply :>