Skip to content

v4.19.12

Compare
Choose a tag to compare
@github-actions github-actions released this 07 Apr 17:23
· 158 commits to master since this release

Documentation v4.19.12: https://raw.githack.com/uiwjs/react-codemirror/5ce6bf4/index.html
Comparing Changes: v4.19.11...v4.19.12

npm i @uiw/react-codemirror@4.19.12
import CodeMirrorMerge from 'react-codemirror-merge';
import { EditorView } from 'codemirror';
import { EditorState } from '@codemirror/state';

const Original = CodeMirrorMerge.Original;
const Modified = CodeMirrorMerge.Modified;
let doc = `one
two
three
four
five`;

export const Example = () => {
  return (
    <CodeMirrorMerge orientation="b-a">
      <Original value={doc} />
      <Modified
        value={doc.replace(/t/g, 'T') + 'Six'}
        extensions={[EditorView.editable.of(false), EditorState.readOnly.of(true)]}
      />
    </CodeMirrorMerge>
  );
};