xdan / jodit

Jodit - Best WYSIWYG Editor for You
https://xdsoft.net/jodit/
MIT License
1.62k stars 342 forks source link

Unable to upload images #1066

Open elementalTIMING opened 5 months ago

elementalTIMING commented 5 months ago

Jodit Version: 4.0.0-beta.119 Browser: Chrome 121 OS: Mac

Hi,

when I try to upload an image via the UI (independent if selecting an image via the file browser or via drag&drop) I always get the following error. I'm running Jodit in an Angular environment.

TypeError: Cannot read properties of undefined (reading 'forImageChangeAttributes')
    at Selection.insertImage (selection.js:585:30)
    at config.js:69:25
    at Array.forEach (<anonymous>)
    at Jodit.defaultHandlerSuccess (config.js:59:24)
    at Uploader.<anonymous> (file-selector.js:35:25)
    at reader.onloadend (send-files.js:41:37)
    at _ZoneDelegate.invoke (zone.js:368:26)
    at Object.onInvoke (core.mjs:14778:33)
    at _ZoneDelegate.invoke (zone.js:367:52)
    at Zone.runGuarded (zone.js:139:47)

Thx for your support/bug fix.

NazarLuchyt commented 5 months ago

Hi! I had the same problem. It is strange why it works like that but you need to import Resizer plugin manually import 'jodit/esm/plugins/resizer/resizer'; It is a little bit weird that starting from 4.x versions a default list of plugins has been changed and right now you don't now what plugin you missed