maddisondesigns / customizer-custom-controls

WordPress Customizer Custom Controls
403 stars 120 forks source link

TinyMCE not working #3

Closed toton333 closed 6 years ago

toton333 commented 6 years ago

I copied the files as they are, but only textarea are showing and not the toolbars. Any help?

maddisondesigns commented 6 years ago

For the TinyMCE Control you need to make sure that you're using WordPress 4.8 and above as the JavaScript functionality required for its use was only added in WP 4.8.

If you are using WP 4.8, I would suggest downloading my Ephemeris theme from .org. You can see a working copy of my TinyMCE control in that theme.

I've also just created a new test site on my dev sever using the latest version of this code and the TinyMCE Control appears to be working fine.

toton333 commented 6 years ago

I'm running 4.9.6. I downloaded your theme and compared with mine. I just used procedural approach to register panel, section, setting, control instead of objective oriented(basically just keeping _s theme structure). It seems like to_json() is not working in the Skyrocket_TinyMCE_Custom_control class for me. I'm definitely making some silly mistake somewhere. Can you take a look at my theme

maddisondesigns commented 6 years ago

I've just had a very quick look. There's a couple of issues that I found. Don't know if it'll fix your TinyMCE issue, but its something to look into.

There's a js error. You're specifying a callback function that doesn't exist. screenshot_696

This shouldn't have anything to do with it, but there's a couple of files that 404'd screenshot_697

It's always a good idea to make sure you use the browser developer tools to ensure all your scripts/files are loading and there's no errors in the console.

If you still have issues, I would suggest temporarily commenting out all your other Customizer stuff and just try and add a TinyMCE control and see if that works. If it does, then you know that some of your other customizer code is causing the issue and you can re-add it back in a section at a time until you find the issue.

toton333 commented 6 years ago

Thank you.