mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
NEW Make default TinyMCE settings configurable
This commit is contained in:
parent
2bdc24c86a
commit
72692f9f10
@ -250,13 +250,11 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
|||||||
private static $image_size_presets = [ ];
|
private static $image_size_presets = [ ];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TinyMCE JS settings
|
* Default TinyMCE JS options which apply to all new configurations.
|
||||||
*
|
*
|
||||||
* @link https://www.tiny.cloud/docs/tinymce/6/tinydrive-getting-started/#configure-the-required-tinymce-options
|
* @link https://www.tiny.cloud/docs/tinymce/6/tinydrive-getting-started/#configure-the-required-tinymce-options
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
*/
|
||||||
protected $settings = [
|
private static array $default_options = [
|
||||||
'fix_list_elements' => true, // https://www.tiny.cloud/docs/tinymce/6/content-filtering/#fix_list_elements
|
'fix_list_elements' => true, // https://www.tiny.cloud/docs/tinymce/6/content-filtering/#fix_list_elements
|
||||||
'formats' => [
|
'formats' => [
|
||||||
'alignleft' => [
|
'alignleft' => [
|
||||||
@ -327,6 +325,8 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
|||||||
. "dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir],"
|
. "dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir],"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $settings = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holder list of enabled plugins
|
* Holder list of enabled plugins
|
||||||
*
|
*
|
||||||
@ -351,6 +351,11 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
|||||||
*/
|
*/
|
||||||
protected $theme = 'silver';
|
protected $theme = 'silver';
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->settings = static::config()->get('default_options');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the theme
|
* Get the theme
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user