react-editor-js icon indicating copy to clipboard operation
react-editor-js copied to clipboard

Can't Input Text

Open taufik-nurhidayat opened this issue 3 years ago • 3 comments

Environment

  • "@editorjs/editorjs": "^2.25.0",
  • "@editorjs/header": "^2.6.2",
  • "@editorjs/paragraph": "^2.8.0",
  • react-editor-js version: "^2.1.0"

Describe

I can't Input anything, but no warning or error in console. This is my code

// pages/newpost.js
import dynamic from 'next/dynamic'
const CustomEditor = dynamic(()=>import('../components/editor'),{ssr:false})
export default function NewPost(){
  return (
    <> <CustomEditor /></>
  )
}

Components code

// components/editor.js
import { createReactEditorJS } from 'react-editor-js'                                   
const Header = require('@editorjs/header')
export default function CustomEditor({data}){

  const ReactEditorJS = createReactEditorJS()

  const TOOLS = {
    header: Header,
  }
 return(
    <ReactEditorJS tools={TOOLS} holder="editor">                                 
<div id="editor" className="my-4 border h-64 relative"></div>
    </ReactEditorJS>
  )
}

In console that is ready to use but, I try tap the editorjs and not do anything IMG_20220721_115353

taufik-nurhidayat avatar Jul 21 '22 04:07 taufik-nurhidayat

IMG_20220721_130033

after look element is like EditorJS not rendered

taufik-nurhidayat avatar Jul 21 '22 06:07 taufik-nurhidayat

Perhaps you should disable <React.StrictMode> in your index.jsx

Maxfri avatar Jul 26 '22 07:07 Maxfri

@Maxfri Thanks it helped me to solve rending issue. Is it a bug needs to be addressed in the component to support strict mode?

msnisha avatar Oct 12 '22 21:10 msnisha