1

In magento 2.3.1, installed on aws lightsail using bitnami. I'm trying to disable tinymce from inserting <p> tags, and the solution that many agree with is

https://stackoverflow.com/a/26396255/1920003

forced_root_block : '', /* <-- Add this setting */

to

js/mage/adminhtml/wysiwyg/tiny_mce/setup.js

But there are many setup.js files and none look like the standard setup.js file. I really want to apply this solution because

  1. I can't upgrade to newer version off magento, I have 50 extensions that will break
  2. I can't disable the wysiwyg, there are none technical users editing the site
  3. I believe this will work, when I used to create my own hand written CMSes, I used to face a similar problem and fix it like that.
0

The user hoangnm gave the right answer on my Reddit post, more testing is needed but it seems that the file I need to edit is

lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js

I added this option on line 206 and the problem seems, at first glance to be fixed, again more testing is needed to verify that.

    settings = {
        selector: '#' + this.getId(),
        theme: 'modern',
        'entity_encoding': 'raw',
        'convert_urls': false,
        'content_css': this.config.tinymce4['content_css'],
        'relative_urls': true,
        menubar: false,
        plugins: this.config.tinymce4.plugins,
        toolbar: this.config.tinymce4.toolbar,
        adapter: this,
        forced_root_block: '', /* <-- Add this setting */
| improve this answer | |

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.