Source of file _config.php
Size: 1,092 Bytes - Last Modified: 2021-12-23T10:20:24+00:00
/var/www/docs.ssmods.com/process/src/_config.php
12345678910111213141516171819202122232425262728 | <?php use SilverStripe\Core\Config\Config; use SilverStripe\Forms\HTMLEditor\HtmlEditorConfig; use Silverstripe\Shortcodable; if (!defined('SHORTCODABLE_DIR')) { define('SHORTCODABLE_DIR', rtrim(basename(dirname(__FILE__)))); } if (SHORTCODABLE_DIR != 'shortcodable') { throw new \Exception('The edit shortcodable module is not installed in correct directory. The directory should be named "shortcodable"'); } // enable shortcodable buttons and add to HtmlEditorConfig $htmlEditorNames = Config::inst()->get(Shortcodable::class, 'htmleditor_names'); if (is_array($htmlEditorNames)) { foreach ($htmlEditorNames as $htmlEditorName) { // HtmlEditorConfig::get($htmlEditorName)->enablePlugins(array( // 'shortcodable' => sprintf('/resources/%s/javascript/editor_plugin.js', SHORTCODABLE_DIR) // )); HtmlEditorConfig::get($htmlEditorName)->addButtonsToLine(1, 'shortcodable'); } } // register classes added via yml config $classes = Config::inst()->get(Shortcodable::class, 'shortcodable_classes'); Shortcodable::register_classes($classes); |