forked from silverstripe/silverstripe-asset-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_config.php
22 lines (19 loc) · 763 Bytes
/
_config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
use SilverStripe\Core\Manifest\ModuleLoader;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
// Avoid creating global variables
call_user_func(function () {
$module = ModuleLoader::inst()->getManifest()->getModule('silverstripe/asset-admin');
// Re-enable media dialog
$config = TinyMCEConfig::get('cms');
$config->enablePlugins([
'ssmedia' => $module
->getResource('client/dist/js/TinyMCE_ssmedia.js'),
'ssembed' => $module
->getResource('client/dist/js/TinyMCE_ssembed.js'),
'sslinkfile' => $module
->getResource('client/dist/js/TinyMCE_sslink-file.js'),
]);
$config->insertButtonsAfter('table', 'ssmedia');
$config->insertButtonsAfter('ssmedia', 'ssembed');
});