#19 ひとまづ表示のみ
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import MdEditor from 'react-markdown-editor-lite'
|
||||
import 'react-markdown-editor-lite/lib/index.css'
|
||||
import { marked } from 'marked'
|
||||
|
||||
type Props = { value: string
|
||||
onChange: (text: string) => void
|
||||
onSave: () => void }
|
||||
|
||||
|
||||
const WikiEditor = ({ value, onChange, onSave }) => (
|
||||
<div className="wiki-editor">
|
||||
<MdEditor value={value}
|
||||
style={{ height: '500px' }}
|
||||
renderHTML={text => marked (text)} />
|
||||
<button onClick={onSave}>保存</button>
|
||||
</div>)
|
||||
|
||||
|
||||
export default WikiEditor
|
||||
Reference in New Issue
Block a user