0

After Gutenburg, Wordpress almost forgot Class Editor, Classic editor runs on a old TinyMCE version. I want to have the newer TinyMCE for my site. But the Add Media Button, from WP editor is also close to my Heart.

I am trying to build a TinyMCE 5 based Textarea, but I want it to have the "Add Media button", so that I can upload directly to the Uploads directory.

The Default wp_editor perfectly shows the Add Media Button

Now as you can see the default Wordpress Editor not very good looking, and lacks some features like Spellcheck.

So I shifted to TinyMCE 5 directly. And while every thing is lovable, I miss the warm environment of Media Uploading. Therefore, I wanted to get back the Add Media button, and show it above the menubar.

Below is the picture of my site with TinyMCE 5, and no Add Button

Tiny MCE 5 based UI

So How do I get the Add Media button into the TinyMCE 5

    <script src="https://cdn.tiny.cloud/1/tmo3w2e3uojdd4y4gnmakycz5nmgjbzrua7hv7x3e3rz97mq/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
<script type="text/javascript">
tinymce.init({
    selector: "#frontier_post_content",
    external_plugins: { 
        "wordpress": "https://milyin.com/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js",
        "wpgallery":"https://milyin.com/wp-includes/js/tinymce/plugins/wpgallery/plugin.min.js",
        "wpautoresize":"https://milyin.com/wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js",
        "wpdialogs":"https://milyin.com/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js"
    }
});

As you can see, I tried to add the Wordpress Plugins that I found in wp-includes/js/tinymce, assuming that these plugins would give me my Add Media button.

I added the following Plugins

  • Wordpress

  • WP Gallery

  • WP AutoResize

  • WP Dialogs

But unfortunately the Button did not come back, please help me figure out how to get the add media button back.

Please ignore the Light Mode/Dark mode difference between my 2 images

Your Answer

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

Browse other questions tagged or ask your own question.