mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-06 06:29:58 +08:00
feat: replace react-codemirror2 with @uiw/react-codemirror (#3577)
Signed-off-by: WindSpiritSR <simon343riley@gmail.com>
This commit is contained in:
@ -21,10 +21,7 @@ import * as Setting from "./Setting";
|
||||
import i18next from "i18next";
|
||||
import WebhookHeaderTable from "./table/WebhookHeaderTable";
|
||||
|
||||
import {Controlled as CodeMirror} from "react-codemirror2";
|
||||
import "codemirror/lib/codemirror.css";
|
||||
require("codemirror/theme/material-darker.css");
|
||||
require("codemirror/mode/javascript/javascript");
|
||||
import Editor from "./common/Editor";
|
||||
|
||||
const {Option} = Select;
|
||||
|
||||
@ -304,11 +301,7 @@ class WebhookEditPage extends React.Component {
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<div style={{width: "900px", height: "300px"}} >
|
||||
<CodeMirror
|
||||
value={previewText}
|
||||
options={{mode: "javascript", theme: "material-darker"}}
|
||||
onBeforeChange={(editor, data, value) => {}}
|
||||
/>
|
||||
<Editor value={previewText} lang="js" fillHeight readOnly dark />
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
|
Reference in New Issue
Block a user