diff --git a/plugins/editors/tinymce/tinymce.php b/plugins/editors/tinymce/tinymce.php index a7f16d87720d3..d25765092a9a6 100644 --- a/plugins/editors/tinymce/tinymce.php +++ b/plugins/editors/tinymce/tinymce.php @@ -200,6 +200,7 @@ public function onDisplay($name, $content, $width, $height, $col, $row, $buttons ->where('client_id=0 AND home=' . $db->quote('1')); $db->setQuery($query); + try { $template = $db->loadResult(); @@ -840,6 +841,7 @@ public function onDisplay($name, $content, $width, $height, $col, $row, $buttons }, paste_data_images: $allowImgPaste, "; + switch ($mode) { case 0: /* Simple mode*/ @@ -854,14 +856,14 @@ public function onDisplay($name, $content, $width, $height, $col, $row, $buttons case 1: default: /* Advanced mode*/ $toolbar1 = "bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | formatselect | bullist numlist " - . "| outdent indent | undo redo | link unlink anchor image code | hr table | subscript superscript | charmap"; + . "| outdent indent | undo redo | link unlink anchor code | hr table | subscript superscript | charmap"; $script .= " valid_elements : \"$valid_elements\", extended_valid_elements : \"$elements\", invalid_elements : \"$invalid_elements\", // Plugins - plugins : \"table link image code hr charmap autolink lists importcss $dragDropPlg\", + plugins : \"table link code hr charmap autolink lists importcss $dragDropPlg\", // Toolbar toolbar1: \"$toolbar1 | $toolbar5\", removed_menuitems: \"newdocument\", @@ -1051,7 +1053,6 @@ private function tinyButtons($name, $excluded) btnOptions = getBtnOptions(), modalWidth = btnOptions.size && btnOptions.size.x ? btnOptions.size.x : null, modalHeight = btnOptions.size && btnOptions.size.y ? btnOptions.size.y : null;'; - } else { @@ -1065,6 +1066,7 @@ private function tinyButtons($name, $excluded) title: \"" . $title . "\", icon: \"" . $icon . "\", onclick: function () {"; + if ($button->get('modal') || $href) { $tempConstructor .= " @@ -1083,6 +1085,7 @@ private function tinyButtons($name, $excluded) modalOptions.height = modalHeight; } editor.windowManager.open(modalOptions);"; + if ($onclick && ($button->get('modal') || $href)) { $tempConstructor .= "\r\n @@ -1096,6 +1099,7 @@ private function tinyButtons($name, $excluded) " . $onclick . " "; } + $tempConstructor .= " } });