Override a default Wysiwyg function

Hi,

I override insertFile function locate in node_modules/@strapi/admin/admin/src/content-manager/components/Wysiwyg/utils/utils.js to do some additional stuff.

Currently I use patch-package but I wanted to know how could I do this without patching. In V3 I could extend admin files, what could I do in v4 ?
Could I create a new plugin based on the default wysiwyg and change only this file ?
Could I extend it in some way ?

Thanks

System Information
  • Strapi Version: 4.1.12
  • Operating System: Mac OS 12.4
  • Database: Posgresql
  • Node Version:
  • NPM Version:
  • Yarn Version: