Using TinyMCE with responsive file manager PHP and Javascript
How you want to arrange your JS files depends also on your build processes too, and whether you want to utilise the cloud version of TinyMCE, or a self-hosted one.
If you're sticking with self-hosted, I find it easier to move external plugins out of the TinyMCE folder - this just makes updating the TinyMCE core easier. You can replace an entire TinyMCE folder with a new version, and know that the Responsive File Manager is not lost.
I would recommend splitting any external plugins (like Responsive File Manager, or anything else you write yourself too) to a separate folder outside of the TinyMCE folder - in the long run, just makes it easier to maintain.
Alternatively, you could use the TinyMCE cloud version - which means you don't need to host it yourself, and you would get the minor point updates as they come out (which for the 5 version have had some really nice features added). To do this, you can visit tiny.cloud and sign up for an API key, which is free. They offer premium plugins at a cost if there are features that you want to use.
For the config.php file, that all looks fine - it's about tweaking it to suit your folder structure.
In your init.js file, I'm assuming you have two different TinyMCE configs? If that is not the case, and you only have one configuration, then you don't need your second init call - the one that references &quot;demoBaseConfig&quot; could be removed.
The first call is initialising TinyMCE on any textarea, using the plugins and toolbar as stated, and hooking in to the Responsive File Manager.
If you wanted to clean it up, you could slim down your plugins array to only include those that you're actually using. There are some plugins here that you don't have in your toolbar, so could slim down the configuration further.
One thing I have done when using TinyMCE is have a number of JS objects that store different configurations, with a selector of &quot;textarea.simple&quot; or &quot;textarea.full&quot; (for two editor types).
The two configurations here are a simple editor (such as maybe basic text choices, adding links, etc) where as the full is a more feature-rich experience too. There are times when you may want to give your users a HTML editor but without too many options (such as for a bio or small snippet) and others where they need a full suite of options (like an article editor). This is more about UX, but just something to be aware of - not every TinyMCE instance needs to look the same.
If you were to go down this path, you would have one init call per configuration option, such as:
tinymce.init({
    selector: &quot;textarea.simple&quot;,
    ... 
    [whatever simple config options you need]
});

tinymce.init({
    selector: &quot;textarea.full&quot;,
    ... 
    [whatever full suite config options you need]
});

Just remember to add the appropriate class to your textarea and you'll be good to go.