Releases: uiwjs/react-textarea-code-editor
Releases Β· uiwjs/react-textarea-code-editor
v2.0.0
Documentation v2.0.0: https://raw.githack.com/uiwjs/react-textarea-code-editor/98b656f/index.html
Comparing Changes: v1.6.0...v2.0.0
npm i @uiw/react-textarea-code-editor@2.0.0
- π refactor: replace dependency @mapbox/rehype-prism -> rehype-prism-plus. e4e677a @jaywcjlove
- π chore: update workflows config. b219ffe @jaywcjlove
- π chore: update workflows config. 80e1dfe @jaywcjlove
- π feat: support dark-mode style. 4770c35 @jaywcjlove
Support dark-mode/night-mode
By default, the dark-mode
is automatically switched according to the system. If you need to switch manually, just set the data-color-mode="dark"
parameter for html Element.
<html data-color-mode="dark">
document.documentElement.setAttribute('data-color-mode', 'dark')
document.documentElement.setAttribute('data-color-mode', 'light')
Inherit custom color variables by adding .w-tc-editor-var
selector.
const Demo = () => {
return (
<div>
<div className="w-tc-editor-var"> </div>
<CodeEditor value={code} />
</div>
)
}
v1.6.0
Documentation v1.6.0: https://raw.githack.com/uiwjs/react-textarea-code-editor/8f26da0/index.html
Comparing Changes: v1.5.2...v1.6.0
npm i @uiw/react-textarea-code-editor@1.6.0
- π feat: add rehypePlugins props (#60) dbdaf2d @jaywcjlove
v1.5.2
Documentation v1.5.2: https://raw.githack.com/uiwjs/react-textarea-code-editor/582075b/index.html
Comparing Changes: v1.5.1...v1.5.2
npm i @uiw/react-textarea-code-editor@1.5.2
- π website: add public/bundle.html bab250f @jaywcjlove
- π website: update public/bundle.html b3d2894 @jaywcjlove
- π chore(deps): update dependency @uiw/react-markdown-preview to ~3.5.0 (#98) 928c8ea @renovate-bot
- π fix: Fix string html escape error (#101). 84b66fe @jaywcjlove
- π chore: update workflows config. c6d38af @jaywcjlove
v1.5.1
npm i @uiw/react-textarea-code-editor@1.5.1
- π chore: update workflows config. 1cafbe7 @jaywcjlove
- π fix: update files feild in package.json 8fa00d0 @jaywcjlove
- π doc: Update README.md c5744d5 @jaywcjlove
Bundle Example: https://uiwjs.github.io/react-textarea-code-editor/bundle.html
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://unpkg.com/@babel/standalone@7.17.x/babel.min.js" crossorigin></script>
<script src="https://unpkg.com/react@17.x/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@17.x/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/@uiw/codepen-require-polyfill/index.js" crossorigin></script>
<link rel="stylesheet" href="https://unpkg.com/@uiw/react-textarea-code-editor/dist/editor.css">
</head>
<body>
<a href="https://uiwjs.github.io/react-textarea-code-editor">@uiw/react-textarea-code-editor</a>
<div id="container" style="padding: 24px"></div>
<script src="https://unpkg.com/@uiw/react-textarea-code-editor/dist/editor.min.js"></script>
<script type="text/babel">
import CodeEditor from '@uiw/react-textarea-code-editor';
const Demo = () => {
const [code, setCode] = React.useState(
`function add(a, b) {\n return a + b;\n}`
);
return (
<React.Fragment>
<CodeEditor
value={code}
language="js"
placeholder="Please enter JS code."
onChange={(evn) => setCode(evn.target.value)}
padding={15}
style={{
fontSize: 12,
backgroundColor: "#f5f5f5",
fontFamily: 'ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace',
}}
/>
</React.Fragment>
);
}
ReactDOM.render(<Demo />, document.getElementById('container'));
</script>
</body>
</html>
v1.5.0
npm i @uiw/react-textarea-code-editor@1.5.0
- π chore: update .github/workflows/ci.yml 4e59acf @jaywcjlove
- π doc: Update README.md bcce049 @jaywcjlove
- π chore: update renovate config. 01cbb3a @jaywcjlove
- π chore: update .gitignore 7456983 @jaywcjlove
- π feat: output bundle file. 84069cf @jaywcjlove
- π chore: update workflows config. 1203cf2 @jaywcjlove
v1.4.16
npm i @uiw/react-textarea-code-editor@1.4.16
- π chore(jest): modify jest config. 2a6ad14 @jaywcjlove
- π fix: Allow to prevent shortcuts processing in onKeyDown by returning false (#87) 8b8a7a2 @Badestrand
- π chore: update .github/workflows/ci.yml 61c8cd4 @jaywcjlove
- π doc: available languages (#89) ccbd026 @KallieLev
- β test: Fix test case. 2738057 @jaywcjlove
v1.4.15
npm i @uiw/react-textarea-code-editor@1.4.15
- π website: Update example. 7eb7b70 @jaywcjlove
- π chore(deps): update dependency @uiw/react-markdown-preview to v3.4.0 #64 02b205c @jaywcjlove
- π chore(deps): update dependency @uiw/react-markdown-preview to v3.4.2 (#71) 5df04b4 @renovate-bot
- π chore(deps): update dependency kkt to v7. 8e69ff3 @jaywcjlove
- π fix(deps): update dependency @babel/runtime to v7.16.7 (#72) 04f2415 @renovate-bot
v1.4.14
npm i @uiw/react-textarea-code-editor@1.4.14
- π chore: update .github/workflows/ci.yml 3e05fea @jaywcjlove
- π chore: update .github/workflows/ci.yml a905573 @jaywcjlove
- π jest: Fix jest config. 6c8e7da @jaywcjlove
- π chore: update .github/workflows/ci.yml 6211cd5 @jaywcjlove
- π chore: update .github/workflows/ci.yml 02a48f3 @jaywcjlove
- π doc: Update coverage badge. e28daf4 @jaywcjlove
- π chore(deps): update dependency tsbb to v3.4.1 (#56) 6aecce3 @renovate-bot
- π fix(deps): update dependency @mapbox/rehype-prism to v0.8.0 (#57) 42ae56c @renovate-bot
- π chore(deps): update dependency @uiw/react-markdown-preview to v3.3.5 (#62) fe15eae @renovate-bot
- π chore(deps): update dependency rehype-attr to v2.0.6 (#61) e19ef3f @renovate-bot
- π chore(deps): update dependency compile-less-cli to v1.8.9 (#59) 136f38b @renovate-bot
- π chore(deps): update dependency @testing-library/react to v12.1.2 (#58) 1a0d070 @renovate-bot
- π chore(deps): update dependency @types/react to v17.0.27 (#55) 921107f @renovate-bot
- π chore(deps): update dependency lint-staged to v11.2.0 (#63) 7f4becc @renovate-bot
v1.4.13
npm i @uiw/react-textarea-code-editor@1.4.13
- π chore(deps): update dependency code-example to v3.1.0 (#50) adf8af3
- π chore(deps): update dependency code-example to v3.3.1 (#51) f128c20
- π chore(deps): update dependency prettier to v2.4.1 (#54) 1048714
- π chore(deps): update dependency rehype-attr to v2.0.3 (#53) 4297d3f
- π chore(deps): update dependency @uiw/react-markdown-preview to v3.3.3 (#52) de174ab
- π chore(deps): update dependency @types/react to v17.0.21 (#49) ae1fb7a
- π¨ style: Modify select style. f3fbeeb
v1.4.12
npm i @uiw/react-textarea-code-editor@1.4.12