Skip to content

Commit e4d5530

Browse files
committed
Fix TinyMCE js url
1 parent 426d029 commit e4d5530

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

conf/_application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Release date (ISO)
2222
* @global string
2323
*/
24-
$app_date = '2020-06-24';
24+
$app_date = '2020-07-24';
2525

2626
/**
2727
* Long version string for checking differences

plugins/tinymce_plugin/_tinymce.plugin.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,9 @@ function get_tmce_init( $edit_layout, $content_id, $target_type )
803803

804804
global $baseurl;
805805

806+
// Get URL of TinyMCE JS files:
807+
$tiny_mce_js_files_url = ( is_admin_page() || empty( $Blog ) ? $rsc_url : $Blog->get_local_plugins_url() ).'js/tiny_mce/';
808+
806809
$tmce_plugins_array = array(
807810
'image',
808811
'importcss',
@@ -975,7 +978,7 @@ function get_tmce_init( $edit_layout, $content_id, $target_type )
975978
// comma separated list of plugins: -- http://wiki.moxiecode.com/index.php/TinyMCE:Plugins
976979
$init_options[] = 'plugins : "'.$tmce_plugins.'"';
977980
$init_options[] = 'external_plugins: {
978-
"morebreak" : "'.$rsc_url.'js/tiny_mce/plugins/morebreak/plugin.min.js"
981+
"morebreak" : "'.$tiny_mce_js_files_url.'plugins/morebreak/plugin.min.js"
979982
}';
980983
$init_options[] = 'morebreak_separator : "[teaserbreak]"';
981984
$init_options[] = 'pagebreak_separator : "[pagebreak]"';
@@ -1003,7 +1006,7 @@ function get_tmce_init( $edit_layout, $content_id, $target_type )
10031006
$init_options[] = 'block_formats : "Paragraph=p;Preformatted=pre;Block Quote=blockquote;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Address=address;Definition Term=dt;Definition Description=dd;DIV=div"';
10041007
$init_options[] = 'resize : true';
10051008
$init_options[] = 'language : "'.$tmce_language.'"';
1006-
$init_options[] = 'language_url : "'.$rsc_url.'js/tiny_mce/langs/'.$tmce_language.'.js"';
1009+
$init_options[] = 'language_url : "'.$tiny_mce_js_files_url.'langs/'.$tmce_language.'.js"';
10071010
if( function_exists( 'enchant_broker_init' ) )
10081011
{ // Requires Enchant spelling library
10091012
$init_options[] = 'spellchecker_rpc_url: \'spellchecker.php\'';

0 commit comments

Comments
 (0)