We have defined the following in wp-config.php
define('WP_CONTENT_DIR', '/var/www/vhosts/cdn.domain.com/wp-content');
define('WP_CONTENT_URL', 'http://cdn.domain.com/wp-content');
We have also created a custom TinyMCE button
add_filter('mce_external_plugins', array($this, 'add_tinymce_plugin'));
add_filter('mce_buttons', array($this, 'register_tinymce_button' ));
The button is appearing but fails when clicked. According to console:
Error: Permission denied to access property "tinymce"
tinymce = tinyMCE = parentWin.tinymce;
I believe this is happening because WordPress is being served from http://www.domain.com but the popup is being served from http://cdn.domain.com. It works perfectly without WP_CONTENT_URL and WP_CONTENT_DIR. Please advise.