1

I'm adding wysiwyg editor in admin custom form enter image description here

All displays good and working fine, but when I click on Insert variable I have an error: Uncaught ReferenceError: MagentovariablePlugin is not defined at HTMLButtonElement.onclick

Thanks.

asked Apr 30, 2020 at 20:20

2 Answers 2

1

Create below file in your module

app/code/Vendor/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml

Content for this file is..

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <update handle="editor"/>
</page>

And more information and most useful link :-

How to make field as WYSIWYG editor in system.xml in configuration?

Hope this help you

Thanks ...

answered Apr 30, 2020 at 20:50
11
  • I tried to do it but it didn’t work... Commented Apr 30, 2020 at 21:02
  • you check attached link ??? Commented Apr 30, 2020 at 21:04
  • I need to create app/code/Vendor/Module/Block/Adminhtml/System/Config/Form/Field/Editor.php file to my editor? I can't understand how to indicate path to this block from my fieldset Commented Apr 30, 2020 at 21:11
  • you add system.xml file ??? Commented Apr 30, 2020 at 21:14
  • This file need to add editor to configuration page, but I'm need to add editor in custom form. Or I'm wrong? Commented Apr 30, 2020 at 21:16
0

For the WYSIWYG editor, default Magento's variable.js could not load. This is the full path of the js file:

\vendor\magento\module-variable\view\adminhtml\web\variables.js

You can override this file in your custom module and call this manually by adding this file in adminhtml_system_config_edit.xml in the head block.

Get all your queries solved. I would feel grateful for doing it.

Marius
199k55 gold badges431 silver badges837 bronze badges
answered Jul 9, 2024 at 12:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.