2

I followed this blog to add WYSIWYG editor (TinyMCE) in my custom Admin Magento Module. I can see it in my backend, but the issue is when I click on Insert Image, Insert Variable or Insert Widget, it shows me JS error in my Error Console.

Could someone shed some light on how to integrate WYSIWYG in backend as well as on frontend (ex: Contact Us Page) with the correct Magento approach.

Thanks

  • What's the error in the console? – Marius Jun 6 '14 at 10:28
  • Insert Widget: ReferenceError: widgetTools is not defined Insert Image : MediabrowserUtility is not defined Insert Variable: MagentovariablePlugin is not defined – Mark Jun 6 '14 at 10:39
2

It looks like your page is missing the inclusion of the widget.js file. This is normally added in the admin section based on the layout handle editor.

<action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action>

I would suggest that for you custom page you also add the editor layout handle to include add the js and css required.

<your_customer_handle>
    <update handle="editor"/>
</your_customer_handle>

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.