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/[email protected]
- π 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>
)
}