/** * @return array */ private function configure() { $config = ['is_initialized' => $this->initialized, 'selector' => 'textarea#' . $this->id, 'theme' => 'modern', 'height' => $this->config['height'], 'content_css' => $this->minifier->getURI()]; if ($this->initialized === false) { $this->initialized = true; } // Basic editor if (isset($this->config['toolbar']) && $this->config['toolbar'] === 'simple') { $plugins = ['advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen', 'insertdatetime media table contextmenu paste']; $toolbar = 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image'; $imagesAdvanced = 'false'; } else { // Full editor $plugins = ['advlist autolink lists link image charmap print preview hr anchor pagebreak', 'searchreplace wordcount visualblocks visualchars code fullscreen', 'insertdatetime media nonbreaking save table contextmenu directionality', 'emoticons template paste textcolor colorpicker']; $toolbar = 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media | forecolor backcolor emoticons'; $imagesAdvanced = 'true'; if ($this->filemanagerHelpers instanceof \ACP3\Modules\ACP3\Filemanager\Helpers) { $config['filemanager_path'] = $this->filemanagerHelpers->getFilemanagerPath(); } } $config['plugins'] = json_encode($plugins); $config['toolbar'] = $toolbar; $config['image_advtab'] = $imagesAdvanced; return ['template' => 'WYSIWYGTinyMCE/tinymce.tpl', 'config' => $config]; }
/** * @return string */ protected function addElementFromMinifier() { return '<link rel="stylesheet" type="text/css" href="' . $this->minifier->getURI() . '">' . "\n"; }