codex-team / codex-team/editor.js
[Bug] Double codex editor in Reactjs
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I'am trying to setup `editor.js` in my React app. But there is a weird situation in my project. Let me demonstrate:


There is second `codex-editor` which is I don't need it. Also the second `codex-editor` is also main(?) editor. When I console output, it shows the second editor's values:

My React app code:
```
import EditorJS from "@editorjs/editorjs";
import Header from "@editorjs/header";
import List from "@editorjs/list";
import "./App.scss";
function App() {
const editor = new EditorJS({
/**
* Id of Element that should contain the Editor
*/
holder: "editorjs",
/**
* Available Tools list.
* Pass Tool's class or Settings object for each Tool you want to use
*/
tools: {
header: {
class: Header,
inlineToolbar: ["link"],
},
list: {
class: List,
inlineToolbar: true,
},
},
});
const onClickHandler = () => {
editor
.save()
.then((outputData) => {
console.log("Article data: ", outputData.blocks);
})
.catch((error) => {
console.log("Saving failed: ", error);
});
};
return (
Add
);
}
export default App;
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.