jodit icon indicating copy to clipboard operation
jodit copied to clipboard

Unable to upload images

Open elementalTIMING opened this issue 1 year ago • 1 comments

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.

elementalTIMING avatar Jan 28 '24 14:01 elementalTIMING

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

NazarLuchyt avatar Jan 29 '24 12:01 NazarLuchyt