Replace markdown editor with CodeMirror

This commit is contained in:
Gabe Kangas
2022-10-10 20:16:08 -07:00
parent 84dc83359b
commit 61e1a49fd4
4 changed files with 425 additions and 140 deletions

View File

@@ -2,6 +2,7 @@
import React, { useState, useEffect, useContext, FC } from 'react';
import { Typography, Button } from 'antd';
import CodeMirror from '@uiw/react-codemirror';
import { bbedit } from '@uiw/codemirror-theme-bbedit';
import { css } from '@codemirror/lang-css';
import { ServerStatusContext } from '../../utils/server-status-context';
@@ -97,6 +98,7 @@ export const EditCustomStyles: FC = () => {
<CodeMirror
value={content}
placeholder="/* Enter custom CSS here */"
theme={bbedit}
height="200px"
extensions={[css()]}
onChange={onCSSValueChange}