mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 00:46:41 +07:00
made simplier editor, added color coding
This commit is contained in:
parent
601eda17de
commit
c1533e9cb9
15 changed files with 287 additions and 43 deletions
|
@ -1,7 +1,8 @@
|
|||
import { FC } from "react";
|
||||
import styles from "./styles.module.scss";
|
||||
import { ReactMarkdownEditor } from "../../components/ReactMarkdownEditor";
|
||||
import { ReactMarkdownViewer } from "../../components/ReactMarkdownViewer";
|
||||
import { usePersistedValue } from "./hooks/usePersistedValue";
|
||||
import { RemirrorEditor } from "../../components/RemirrorEditor";
|
||||
import styles from "./styles.module.scss";
|
||||
|
||||
interface MarkdownEditorContainerProps {
|
||||
id: string;
|
||||
|
@ -16,7 +17,19 @@ export const MarkdownEditorContainer: FC<MarkdownEditorContainerProps> = ({
|
|||
|
||||
return (
|
||||
<div className={styles.editor}>
|
||||
<RemirrorEditor value={value} onChange={setValue} locked={locked} />
|
||||
{/*
|
||||
locked ? (
|
||||
<ReactMarkdownViewer value={value} />
|
||||
) : (
|
||||
<ReactMarkdownEditor value={value} onChange={setValue} />
|
||||
)
|
||||
*/}
|
||||
{locked ? (
|
||||
<ReactMarkdownViewer value={value} />
|
||||
) : (
|
||||
<ReactMarkdownEditor value={value} onChange={setValue} />
|
||||
// <RemirrorEditor value={value} onChange={setValue} locked={locked} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue