v4.0.0
npm i @uiw/[email protected]
⚠️ 3.0 cannot be upgraded to 4.0+, Migrate from v3 to v4.
import CodeMirror from '@uiw/react-codemirror';
- import 'codemirror/mode/javascript/javascript';
+ import { javascript } from "@codemirror/lang-javascript";
const code = 'console.log("hello world!");';
<CodeMirror
value={code}
- options={{ mode: 'js' }}
+ extensions={[
+ javascript({ jsx: true })
+ ]}
/>
- 📖 doc: Update README.md 9e00372 @jaywcjlove
- 💄 chore(deps): Update depenency code-example to v3.1.0 b8f0af8 @jaywcjlove
- 💄 chore(deps): update dependency code-example to v3.2.0 480d52a @jaywcjlove
- 🌍 website: fix load lang. 1ee4444 @jaywcjlove
- 💄 chore(deps): update dependency code-example to v3.3.1 (#166) c6ebeed @renovate-bot
- 💄 chore(deps): update dependency @types/react to v17.0.21 (#164) 6e82e5d @renovate-bot
- 🌟 feat: Add editable props. 674f386 @jaywcjlove
- 💄 chore: update .github/workflows/ci.yml 19e083d @jaywcjlove