diff --git a/src/components/Markdown/index.jsx b/src/components/Markdown/index.jsx index cf468cb..789ce3b 100644 --- a/src/components/Markdown/index.jsx +++ b/src/components/Markdown/index.jsx @@ -1,25 +1,16 @@ import React from "react"; -import { Card } from "antd"; import "codemirror/lib/codemirror.css"; import "@toast-ui/editor/dist/toastui-editor.css"; import { Editor } from "@toast-ui/react-editor"; -import TypingCard from "@/components/TypingCard"; const Markdown = () => { - const cardContent = `此页面用到的Markdown编辑器是tui.editor(React版)`; return ( -
- -
- - - -
+ ); }; diff --git a/src/components/RichTextEditor/index.jsx b/src/components/RichTextEditor/index.jsx index 9fee76a..7c2f30b 100644 --- a/src/components/RichTextEditor/index.jsx +++ b/src/components/RichTextEditor/index.jsx @@ -5,7 +5,6 @@ import { Editor } from 'react-draft-wysiwyg'; import draftToHtml from 'draftjs-to-html'; import draftToMarkdown from 'draftjs-to-markdown'; import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; -import TypingCard from '@/components/TypingCard' import "./index.less" class RichTextEditor extends Component { state = { @@ -17,12 +16,9 @@ class RichTextEditor extends Component { }); }; render() { - const cardContent = `此页面用到的富文本编辑是react-draft-wysiwyg` const { editorState } = this.state; return ( -
- -
+
{ - return ; +import TypingCard from "@/components/TypingCard"; + +const MarkdownDemo = () => { + const cardContent = ` + 此页面用到的Markdown编辑器是tui.editor(React版)。 + `; + return ( +
+ +
+ + + +
+ ); }; + +export default MarkdownDemo; diff --git a/src/views/components-demo/richTextEditor.jsx b/src/views/components-demo/richTextEditor.jsx index 538d179..4412214 100644 --- a/src/views/components-demo/richTextEditor.jsx +++ b/src/views/components-demo/richTextEditor.jsx @@ -1,5 +1,18 @@ import React from "react"; import RichTextEditor from "@/components/RichTextEditor"; -export default () => { - return ; +import TypingCard from "@/components/TypingCard"; + +const RichTextEditorDemo = () => { + const cardContent = ` + 此页面用到的富文本编辑器是react-draft-wysiwyg。 + ` + return ( +
+ +
+ +
+ ); }; + +export default RichTextEditorDemo;