Using wp_editor() when not logged stopped working

I’ve build myself a custom page template. Within this template I’m using the wp_editor() function. Sadly, when I logout now from my wp site and go now to the page I want to see, I’m getting an error in my console:

Uncaught ReferenceError: tinymce is not defined

When I log back in, everything works quite fine. I’ve also tried to enqueue the editor script if a user isn’t logged in this way:

if ( ! is_user_logged_in() ) {
wp_enqueue_script( ‘wp-tinymce’ );
}

But this don’t solved my issue. I’ve cleaned the cache every time and restarted the server.

So does anyone has an idea how I can get the wp_editor() function runnning with non-logged-in users?

Read more here:: Using wp_editor() when not logged stopped working

Leave a Reply

Your email address will not be published. Required fields are marked *