2

I want to override a JS file which lives in following folder

MAGENTO_ROOT\lib\web\tiny_mce\plugins\advimage\js\image.js

I want to override this file from my custom admin theme or by a module.

Any code snippet or how-to will be greatly appreciated.

Thanks.

  • Did you want to override in custom front or admin theme? – Rakesh Jesadiya Dec 14 '17 at 13:11
  • I want to override it in adminhtml – nuwaus Dec 14 '17 at 13:13
5

You should copy this file to your theme by following path:

MAGENTO_ROOT\app\design\frontend\Magento\luma\web\tiny_mce\plugins\advimage\js\image.js

*replace 'Magento\luma' by your own theme

And then make necessary changes into the file. Magento will use this file automatically instead file from the lib folder.

  • 1
    thanks for the reply, but I want to override it in adminhtml. – nuwaus Dec 14 '17 at 14:14
0

In the Module Magento2-base

html/vendor/magento/magento2-base/lib/web/tiny_mce/plugins/advimage/image.htm:10

You have seen the script include that js/image.js

How to override this htm file read more here : https://stackoverflow.com/questions/37430036/override-html-file-in-custom-module-magento2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.