v3.0.0
Documentation v3.0.0: https://raw.githack.com/uiwjs/react-textarea-code-editor/fd37bcf/index.html
Comparing Changes: v2.1.9...v3.0.0
npm i @uiw/react-textarea-code-editor@3.0.0
- π fix(deps): update dependency @uiw/react-markdown-preview-example to v2 #169 84e9464 @jaywcjlove
- π chore: add sponsor badge. 6937660 @jaywcjlove
- π fix(deps): update dependency rehype to v13 (#162) 8d29326 @renovate-bot
- π type: fix type error. f3c67d7 @jaywcjlove
- π feat: add nohighlight component. 1dc83f5 @jaywcjlove
Remove Code Highlight
The following example can help you exclude code highlighting code from being included in the bundle. @uiw/react-textarea-code-editor/nohighlight
component does not contain the code highlighting package.rehype-prism-plus
import React, { useState } from "react";
import CodeEditor from '@uiw/react-textarea-code-editor/nohighlight';
export default function App() {
const [code, setCode] = useState(
`function add(a, b) {\n return a + b;\n}`
);
return (
<CodeEditor
value={code}
language="js"
placeholder="Please enter JS code."
onChange={(evn) => setCode(evn.target.value)}
padding={15}
style={{
backgroundColor: "#f5f5f5",
fontFamily: 'ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace',
}}
/>
);
}