So I wanted to check out this new rich text editor Editor, https://editorjs.io/
I installed the unofficial reactJS version, but I'm not quite sure what I'm doing wrong here... https://www.npmjs.com/package/react-editor-js
Has any used this before? can it be done with hooks? my thinking is that I need to define an instance of this editor so I can save the data. because currently onChange the editor is not adding any new blocks to the data object or the entered data.
also, if I passed the data object as an empty object in the console does not show an initial EditorJs block.
any help would be appreciated.
function App() {
let data = { '1': 'test' }
return (
<div className="App">
<EditorJs
data={data}
onChange={(e) => console.log(data)}
tools={{
code: Code,
header: Header,
paragraph: Paragraph
}}
/>
</div>
);
}