Skip to content

Releases: uiwjs/react-textarea-code-editor

v2.0.0

18 Mar 04:26
Compare
Choose a tag to compare

npm bundle size

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

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

12 Mar 09:54
Compare
Choose a tag to compare

npm bundle size

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

v1.5.2

12 Mar 09:06
Compare
Choose a tag to compare

npm bundle size

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

v1.5.1

28 Feb 01:49
Compare
Choose a tag to compare

npm bundle size

npm i @uiw/react-textarea-code-editor@1.5.1

v1.5.0...v1.5.1

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

28 Feb 01:35
Compare
Choose a tag to compare

npm bundle size

npm i @uiw/react-textarea-code-editor@1.5.0

v1.4.16...v1.5.0

v1.4.16

07 Feb 07:38
Compare
Choose a tag to compare

npm bundle size

npm i @uiw/react-textarea-code-editor@1.4.16

v1.4.15...v1.4.16

v1.4.15

04 Jan 06:53
Compare
Choose a tag to compare

npm bundle size

npm i @uiw/react-textarea-code-editor@1.4.15

v1.4.14...v1.4.15

v1.4.14

07 Oct 14:11
Compare
Choose a tag to compare

npm bundle size

npm i @uiw/react-textarea-code-editor@1.4.14

v1.4.13...v1.4.14

v1.4.13

19 Sep 16:38
Compare
Choose a tag to compare

npm bundle size

npm i @uiw/react-textarea-code-editor@1.4.13

v1.4.12...v1.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

14 Sep 06:35
Compare
Choose a tag to compare

npm bundle size

npm i @uiw/react-textarea-code-editor@1.4.12

v1.4.11...v1.4.12

  • πŸ’„ chore(deps): update dependency tsbb to v3.2.1 (#48) c5e3ec7