diff --git a/plugins/editors-xtd/readmore/readmore.php b/plugins/editors-xtd/readmore/readmore.php index 61160aacb538d..b627484633369 100644 --- a/plugins/editors-xtd/readmore/readmore.php +++ b/plugins/editors-xtd/readmore/readmore.php @@ -37,7 +37,7 @@ public function onDisplay($name) // Button is not active in specific content components - $getContent = $this->_subject->getContent("'+editor+'"); + $getContent = $this->_subject->getContent($name); $present = JText::_('PLG_READMORE_ALREADY_EXISTS', true); $js = " function insertReadmore(editor) diff --git a/plugins/editors/tinymce/tinymce.php b/plugins/editors/tinymce/tinymce.php index 359e2526df5d4..679e708a4700f 100644 --- a/plugins/editors/tinymce/tinymce.php +++ b/plugins/editors/tinymce/tinymce.php @@ -803,7 +803,7 @@ public function onInit() */ public function onGetContent($editor) { - return 'tinyMCE.get(\'' . $editor . '\').getContent();'; + return 'tinyMCE.activeEditor.getContent();'; } /** @@ -816,7 +816,7 @@ public function onGetContent($editor) */ public function onSetContent($editor, $html) { - return 'tinyMCE.get(\'' . $editor . '\').setContent(' . $html . ');'; + return 'tinyMCE.activeEditor.setContent(' . $html . ');'; } /** @@ -828,7 +828,7 @@ public function onSetContent($editor, $html) */ public function onSave($editor) { - return 'if (tinyMCE.get("' . $editor . '").isHidden()) {tinyMCE.get("' . $editor . '").show()}; tinyMCE.get("' . $editor . '").save();'; + return 'if (tinyMCE.get("' . $editor . '").isHidden()) {tinyMCE.get("' . $editor . '").show()};'; } /**