Skip to content

Commit

Permalink
refs #1749 : added - plugin variables in context model for editor pl…
Browse files Browse the repository at this point in the history
…ugins.

 -
  • Loading branch information
inureyes committed Mar 11, 2015
1 parent 4f53d72 commit b96b80f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/model/common.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ function getEditorInfo($editor) {
$pluginURL = $context->getProperty('service.path') . '/plugins/' . $editorMappings[$editor]['plugin'];
$pluginName = $editorMappings[$editor]['plugin'];
$pluginPath = ROOT . "/plugins/{$pluginName}";
$context->setProperty('plugin.url',$context->getProperty('service.path') . '/plugins/' . $editorMappings[$editor]['plugin']);
$context->setProperty('plugin.name', $editorMappings[$editor]['plugin']);
$context->setProperty('plugin.path',ROOT . "/plugins/{$pluginName}");
if (!empty($configMappings[$pluginName]['config'])) {
$configVal = getCurrentSetting($pluginName);
} else {
Expand Down
2 changes: 2 additions & 0 deletions library/view/ownerView.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ function getEditor() {
if (isset($editor['initfunc']) && function_exists($editor['initfunc'])) {
echo "\t\t\n".call_user_func_array($editor['initfunc'], array(&$editor))."\t\t\n";
$pluginURL = $pluginName = "";
$context->unsetProperty('plugin.url');
$context->unsetProperty('plugin.name');
}
}
}
Expand Down
1 change: 1 addition & 0 deletions plugins/ED_tinyMCE/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function tinyMCE_editorinit($editor) {
if(empty($config['editormode'])) $config['editormode'] = 'simple';
if(empty($config['width'])) $config['width'] = 'skin';
if(empty($config['srctheme'])) $config['srctheme'] = 'default';
// var_dump($context->getAllFromNamespace("plugin"));
ob_start();
?>
var editor = new tinymce.Editor('editWindow', {
Expand Down

0 comments on commit b96b80f

Please sign in to comment.