Browse Source

feat: render task list

node 6 years ago
parent
commit
630c793825
3 changed files with 10 additions and 5 deletions
  1. 2
    2
      src/App.js
  2. 2
    2
      src/MarkdownEditor/index.css
  3. 6
    1
      src/MarkdownEditor/index.js

+ 2
- 2
src/App.js View File

@@ -13,7 +13,7 @@ import {
13 13
     faListOl,
14 14
     faTasks,
15 15
  } from '@fortawesome/free-solid-svg-icons'
16
-import RichEditor from './RichEditor';
16
+// import RichEditor from './RichEditor';
17 17
 import MarkdownEditor from './MarkdownEditor';
18 18
 import './App.css'
19 19
 
@@ -34,7 +34,7 @@ class App extends Component {
34 34
   render() {
35 35
     return (
36 36
       <div className="main">
37
-        <RichEditor />
37
+        {/* <RichEditor /> */}
38 38
         <hr></hr>
39 39
         <MarkdownEditor />
40 40
       </div>

+ 2
- 2
src/MarkdownEditor/index.css View File

@@ -1,4 +1,4 @@
1
-.container {
1
+/* .container {
2 2
   width: 100%;
3 3
   height: 300px;
4
-}
4
+} */

+ 6
- 1
src/MarkdownEditor/index.js View File

@@ -31,7 +31,12 @@ export default class MarkdownEditor extends React.Component {
31 31
         this.state = {
32 32
             mdeState: null,
33 33
         };
34
-        this.converter = new Showdown.Converter({tables: true, simplifiedAutoLink: true});
34
+        this.converter = new Showdown.Converter({
35
+            tables: true,
36
+            simplifiedAutoLink: true,
37
+            strikethrough: true,
38
+            tasklists: true
39
+        });
35 40
     }
36 41
 
37 42
     handleValueChange = (mdeState) => {