1
1
<?php
2
2
/***
3
3
TinyMCE Editor for Textcube
4
+ 2.0
4
5
5
6
Needlworks / Jeongkyu Shin (https://github.com/inureyes)
6
7
CodeMirror plugin by zvuc (https://github.com/zvuc)
@@ -12,9 +13,8 @@ function tinyMCE_handleconfig($configVal) {
12
13
}
13
14
14
15
function tinyMCE_editorinit ($ editor ) {
15
- global $ configVal, $ pluginURL , $ pluginPath ;
16
+ global $ configVal ;
16
17
$ context = Model_Context::getInstance ();
17
- $ blogid = getBlogId ();
18
18
$ config = Setting::fetchConfigVal ($ configVal );
19
19
if (empty ($ config ['editormode ' ])) $ config ['editormode ' ] = 'simple ' ;
20
20
if (empty ($ config ['width ' ])) $ config ['width ' ] = 'skin ' ;
@@ -28,13 +28,13 @@ function tinyMCE_editorinit($editor) {
28
28
theme : 'modern',
29
29
skin : 'light',
30
30
<?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 ' )) {
32
32
?>
33
33
language : '<?php echo strtolower ($ context ->getProperty ('blog.language ' ));?> ',
34
34
<?php
35
35
}
36
36
?>
37
- popup_css_add: "<?php echo $ pluginURL ;?> /popup.css",
37
+ popup_css_add: "<?php echo $ context -> getProperty ( " plugin.uri " ) ;?> /popup.css",
38
38
menubar: false,
39
39
fixed_toolbar_container: "#formatbox-container",
40
40
toolbar_location : "external",
@@ -155,12 +155,11 @@ function tinyMCE_editorinit($editor) {
155
155
}
156
156
157
157
function tinyMCE_adminheader ($ target , $ mother ) {
158
- global $ suri , $ pluginURL ;
159
158
$ context = Model_Context::getInstance ();
160
159
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" ;
164
163
}
165
164
}
166
165
return $ target ;
0 commit comments