From e2713e38814c7003b0cf7af620a3fe757ff9860e Mon Sep 17 00:00:00 2001 From: macstalker Date: Sun, 21 Aug 2022 20:26:28 -0400 Subject: [PATCH] Update universalbuttons.php --- universalbuttons.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 universalbuttons.php diff --git a/universalbuttons.php b/universalbuttons.php old mode 100644 new mode 100755 index 3e5745a..ef150a3 --- a/universalbuttons.php +++ b/universalbuttons.php @@ -9,6 +9,8 @@ defined('_JEXEC') or die; +use Joomla\CMS\Factory; + class plgButtonUniversalButtons extends JPlugin { public function onDisplay($name, &$params) @@ -47,7 +49,7 @@ public function onDisplay($name, &$params) case "0": - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // ... $root = ''; if ($app->isAdmin()) { @@ -104,7 +106,7 @@ public function onDisplay($name, &$params) $iVariable++; } - $js .= " jInsertEditorText( str, editor); }"; + $js .= " Joomla.editors.instances[editor].replaceSelection(str); }"; $css = "";