tinymce / tinymce-react

Offical TinyMCE React component
MIT License
938 stars 151 forks source link

Uncaught TypeError: this.editor.setMode after Tinymce upgrade. #366

Closed shootex20 closed 1 year ago

shootex20 commented 1 year ago

Hello,

I apologize if this is not the correct area, I'm working on migrating my Tinymce editor from 5.8.2 to 6.1.0, everything was smoothly until 2 of my 3 editors seem to be having issues and causing the application to crash error below;

Uncaught TypeError: this.editor.setMode is not a function
    at t.componentDidUpdate (Editor.js:93:29)
    at is (react-dom.production.min.js:212:231)
    at fc (react-dom.production.min.js:255:229)
    at t.unstable_runWithPriority (scheduler.production.min.js:19:467)
    at Uo (react-dom.production.min.js:122:325)
    at pc (react-dom.production.min.js:248:370)
    at Js (react-dom.production.min.js:239:376)
    at react-dom.production.min.js:123:115
    at t.unstable_runWithPriority (scheduler.production.min.js:19:467)
    at Uo (react-dom.production.min.js:122:325)

Hoping someone may have encountered this issue, any and all help is appreciated.

exalate-issue-sync[bot] commented 1 year ago

Ref: INT-2962

tiny-james commented 1 year ago

Are you using the latest version of the integration? You need a minimum of version 3.13.1 (though I'd recommend 4.1.0) to support TinyMCE 6 as it removed the setMode function.

https://github.com/tinymce/tinymce-react/blob/main/CHANGELOG.md#3131---2022-01-20

shootex20 commented 1 year ago

After taking a look, the package was not updated and was the root of my issue. I apologize and thank you for getting back to me