ilySusu.

Results 4 comments of ilySusu.

I need to get the position of the cursor in the editor to implement a text insertion function. What should I do?

import React, {forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useRef, useState} from 'react'; import CodeMirror from "@uiw/react-codemirror"; import { StateEffect } from "@codemirror/state"; import { javascript } from "@codemirror/lang-javascript"; import { EditorView...

https://codesandbox.io/s/react-codemirror-example-codemirror-6-https-github-com-uiwjs-react-codemirror-issues-314-forked-8glmzg?file=/src/App.js 重现的示例 @jaywcjlove

const editorOptions = ref({ mode: 'application/json', theme: 'default', lineNumbers: true, lineWrapping: true, }); 设置mode 没有效果