Skip to content

Commit 8144597

Browse files
committed
refs #1773 : updated - tinyMCE editor global variable reference to use
context model. -
1 parent afb88d4 commit 8144597

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

plugins/ED_tinyMCE/index.php

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
/***
33
TinyMCE Editor for Textcube
4+
2.0
45
56
Needlworks / Jeongkyu Shin (https://github.com/inureyes)
67
CodeMirror plugin by zvuc (https://github.com/zvuc)
@@ -12,9 +13,8 @@ function tinyMCE_handleconfig($configVal) {
1213
}
1314

1415
function tinyMCE_editorinit($editor) {
15-
global $configVal, $pluginURL, $pluginPath;
16+
global $configVal;
1617
$context = Model_Context::getInstance();
17-
$blogid = getBlogId();
1818
$config = Setting::fetchConfigVal($configVal);
1919
if(empty($config['editormode'])) $config['editormode'] = 'simple';
2020
if(empty($config['width'])) $config['width'] = 'skin';
@@ -28,13 +28,13 @@ function tinyMCE_editorinit($editor) {
2828
theme : 'modern',
2929
skin : 'light',
3030
<?php
31-
if (file_exists($pluginPath.'/tinymce/langs/'.$context->getProperty('blog.language').'.js')) {
31+
if (file_exists($context->getProperty("plugin.path","").'/tinymce/langs/'.$context->getProperty('blog.language').'.js')) {
3232
?>
3333
language : '<?php echo strtolower($context->getProperty('blog.language'));?>',
3434
<?php
3535
}
3636
?>
37-
popup_css_add: "<?php echo $pluginURL;?>/popup.css",
37+
popup_css_add: "<?php echo $context->getProperty("plugin.uri");?>/popup.css",
3838
menubar: false,
3939
fixed_toolbar_container: "#formatbox-container",
4040
toolbar_location : "external",
@@ -155,12 +155,11 @@ function tinyMCE_editorinit($editor) {
155155
}
156156

157157
function tinyMCE_adminheader($target, $mother) {
158-
global $suri, $pluginURL;
159158
$context = Model_Context::getInstance();
160159
if ($context->getProperty('editor.key') == 'tinyMCE') {
161-
if ($context->getProperty('suri.directive') == '/owner/entry/post' || $suri['directive'] == '/owner/entry/edit') {
162-
$target .= "\t<script type=\"text/javascript\" src=\"$pluginURL/tinymce/tinymce.min.js\"></script>\n";
163-
$target .= "\t<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"$pluginURL/override.css\" />\n";
160+
if ($context->getProperty('suri.directive') == '/owner/entry/post' || $context->getProperty("suri.directive") == '/owner/entry/edit') {
161+
$target .= "\t<script type=\"text/javascript\" src=\"".$context->getProperty("plugin.uri","")."/tinymce/tinymce.min.js\"></script>\n";
162+
$target .= "\t<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"".$context->getProperty("plugin.uri","")."/override.css\" />\n";
164163
}
165164
}
166165
return $target;

0 commit comments

Comments
 (0)