Open ghost opened 4 years ago
Do you find out the resolution?I met the same problem.
I got the same message; maybe the element you're using is not textarea.
it works for me following three steps: 1.
2.need to import both js and css import SimpleMDE from 'simplemde'; import 'simplemde/dist/simplemde.min.css';
3.var simplemde = new SimpleMDE({ element: document.getElementById("editor") });
import React from 'react'; import SimpleMDE from 'simplemde';
class MDEditor extends React.Component<any, any> { public editor = null; public componentDidMount() { this.init(); } public init = () => { this.editor = new SimpleMDE({ element: document.getElementById('mdEditor') }); this.editor.value('test'); }; public render() { return
; } }export default MDEditor;