'How to get rid of React-Quill image resizing warning?

Implemented image resizing with React-Quill. The module I used is "quill-image-resize-module-react" and it's working fine. However, whenever I change the content, the warning window keeps coming up. I also wrote some code to get rid of but it doesn't go away Is there any workaround??

Quill.register("modules/imageResize", ImageResize);

This is my quill calling code.

<ReactQuill
              ref={(element) => {
                if (element !== null) {
                  QuillRef.current = element;
                }
              }}
              style={{ height: "650px" }}
              value={contents || ""}
              onChange={setcontents}
              modules={modules}
              formats={formats}
              theme="snow"
              placeholder="내용을 입력해주세요"
            />
          </div>

Warning

 quill Overwriting modules/imageResize with ƒ t(e) {
      var n = this,
          r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
      o(this, t), this.initializeModules = function () {
        n.removeModules(), n.mod…


Solution 1:[1]

Quill.register() should be outside your component. Place it after imports and before export const ComponentName

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 danbeggan