react-quill icon indicating copy to clipboard operation
react-quill copied to clipboard

Multiple instance of Editor

Open devmnj opened this issue 3 years ago • 5 comments

I found an issue with the component , it did work but create multiple instances. I have the code on sandbox

devmnj avatar May 25 '22 16:05 devmnj

@devmnj I've downgraded react and react-dom to the 17.0.2 version and this solved this problem.

necheporenko avatar May 27 '22 13:05 necheporenko

@necheporenko I tried, this time the screen was pure blank, no editor visible'

here is my dependency list

 "dependencies": {
    "@react-three/fiber": "^8.0.19",
    "@testing-library/jest-dom": "^5.16.4",
    "@testing-library/react": "^13.3.0",
    "@testing-library/user-event": "^14.2.0",
    "quill": "^1.3.7",
    "quilljs": "^0.18.1",
    "react": "^17.1.0",
    "react-dom": "^18.1.0",
    "react-quill": "^2.0.0-beta.4",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  },

devmnj avatar May 28 '22 17:05 devmnj

@necheporenko your answer does work for me and it does work with latest react version too.

after few changes in index.js

Old code `import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App';

const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> </React.StrictMode> );`

New Code `import ReactDOM from "react-dom"; import React from "react"; import App from "./App";

const rootElement = document.getElementById("root"); ReactDOM.render(<App />, rootElement);`

devmnj avatar May 30 '22 16:05 devmnj

you just don't use<React.StrictMode>. my old code ReactDOM.createRoot(document.getElementById('root')!).render( <React.StrictMode> <App /> </React.StrictMode> ) my new code: ReactDOM.createRoot(document.getElementById('root')!).render( <App /> )

RSS1102 avatar May 31 '22 18:05 RSS1102

my code on sandbox

RSS1102 avatar May 31 '22 18:05 RSS1102