在自定义tinyMCE按钮中使用ajax url
我正在构建一个插件,需要能够在用户单击自定义tinyMCE按钮(在其onclick函数中)时访问ajax url 如何在vpl-shortcode-editor.js中获取ajax url在自定义tinyMCE按钮中使用ajax url,ajax,tinymce,Ajax,Tinymce,我正在构建一个插件,需要能够在用户单击自定义tinyMCE按钮(在其onclick函数中)时访问ajax url 如何在vpl-shortcode-editor.js中获取ajax url add_filter('mce_external_plugins', 'add_vpl_shortcode_editor'); // adds the button to the tinyMCE bar function add_vpl_shortcode_editor($plugin_array){
add_filter('mce_external_plugins', 'add_vpl_shortcode_editor');
// adds the button to the tinyMCE bar
function add_vpl_shortcode_editor($plugin_array){
$plugin_array['vpl_shortcode_editor'] = plugins_url('js/vpl-shortcode-editor.js', __FILE__);
return $plugin_array;
}