1

I am facing this error in the admin panel. Due to this error my admin panel menus such as order, customers are not loading. It loading forever. Kindly help me to solve this issue.

Uncaught Error: Script error for: tinymce
http://requirejs.org/docs/errors.html#scripterror
at makeError (require.js:166)
at HTMLScriptElement.onScriptError (require.js:1681)
2
  • are you creating any tabs in the admin custom form Commented Oct 3, 2019 at 11:55
  • No, it not loading for even default menus like customer, orders like that. It sometimes loads but sometimes not. Commented Oct 3, 2019 at 13:48

1 Answer 1

1

add a code in your edit.php file

app/code/{vendor}/{Module}/Block/Adminhtml/{your folder}/Edit.php

<?php
namespace Vendor\Module\Block\Adminhtml\Your Folder;

use Magento\Backend\Block\Widget\Form\Container;

class Edit extends Container
{
 ......
.....
.....
 protected function _prepareLayout()
    {
        $this->_formScripts[] = "
            function toggleEditor() {
                if (tinyMCE.getInstanceById('post_content') == null) {
                    tinyMCE.execCommand('mceAddControl', false, 'post_content');
                } else {
                    tinyMCE.execCommand('mceRemoveControl', false, 'post_content');
                }
            };
        ";

        return parent::_prepareLayout();
    }
}
1
  • I am not using the custom module for that. . Commented Oct 4, 2019 at 14:23

Your Answer

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.