Visual Editor not working.. Just another reason
-
My visual editor was blank (not working). The reason was found: I have WP options
home
andsiteurl
set to relative uri/wordpress
instead ofhttp://example.com/wordpress
(since I have a complex system of sharing different tables between websites).There are different ways to make it work. I’ve chosen to make a with a very simple plugin:
add_filter('includes_url', 'my_full_includes_url', 10, 2); function my_full_includes_url($url, $path) { if ($path == 'js/tinymce' && !empty($url) && substr($url, 0, 1) == '/' && isset($_SERVER['HTTP_HOST'])) $url = 'http://' . $_SERVER['HTTP_HOST'] . $url; return $url; }
That’s it. Works for the latest 3.4.2. If you are in 2014 having problems with WP 4.5.7, please check setting the TinyMCE base url, something like
self::$baseurl = includes_url('js/tinymce');
in the _WP_Editors class, and add an action inside
includes_url()
.
- The topic ‘Visual Editor not working.. Just another reason’ is closed to new replies.