A simple code editor with syntax highlighting.
Documentation v3.0.2: https://raw.githack.com/uiwjs/react-textarea-code-editor/f868481/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v3.0.1...v3.0.2
npm i @uiw/[email protected]
Documentation v3.0.1: https://raw.githack.com/uiwjs/react-textarea-code-editor/e1e1ae9/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v3.0.0...v3.0.1
npm i @uiw/[email protected]
Documentation v3.0.0: https://raw.githack.com/uiwjs/react-textarea-code-editor/fd37bcf/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v2.1.9...v3.0.0
npm i @uiw/[email protected]
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',
}}
/>
);
}
Documentation v2.1.9: https://raw.githack.com/uiwjs/react-textarea-code-editor/4207e23/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v2.1.8...v2.1.9
npm i @uiw/[email protected]
Documentation v2.1.8: https://raw.githack.com/uiwjs/react-textarea-code-editor/7276be9/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v2.1.7...v2.1.8
npm i @uiw/[email protected]
Documentation v2.1.7: https://raw.githack.com/uiwjs/react-textarea-code-editor/5547392/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v2.1.6...v2.1.7
npm i @uiw/[email protected]
readOnly
props issue. (#152) 42d50b3 @jaywcjloveDocumentation v2.1.6: https://raw.githack.com/uiwjs/react-textarea-code-editor/2aa7d93/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v2.1.5...v2.1.6
npm i @uiw/[email protected]
Documentation v2.1.5: https://raw.githack.com/uiwjs/react-textarea-code-editor/ef1b29a/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v2.1.4...v2.1.5
npm i @uiw/[email protected]
Documentation v2.1.4: https://raw.githack.com/uiwjs/react-textarea-code-editor/ce820a6/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v2.1.3...v2.1.4
npm i @uiw/[email protected]
Documentation v2.1.3: https://raw.githack.com/uiwjs/react-textarea-code-editor/a82a1cc/index.html
Comparing Changes: https://github.com/uiwjs/react-textarea-code-editor/compare/v2.1.2...v2.1.3
npm i @uiw/[email protected]