Merge pull request #8351 from open-sausages/pulls/4.2/move-to-your-other-left

BUG Use classes for TinyMCE alignment buttons
This commit is contained in:
Robbie Averill 2018-08-31 10:18:03 +12:00 committed by GitHub
commit 94f5d32f41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,8 +216,46 @@ class TinyMCEConfig extends HTMLEditorConfig
*
* @var array
*/
protected $settings = array(
protected $settings = [
'fix_list_elements' => true, // https://www.tinymce.com/docs/configure/content-filtering/#fix_list_elements
'formats' => [
'alignleft' => [
[
'selector' => 'p,h1,h2,h3,h4,h5,h6,td,th,li',
'classes' =>'text-left'
],
[
'selector' => 'div,ul,ol,table,img,figure',
'classes' =>'left'
]
],
'aligncenter' => [
[
'selector' => 'p,h1,h2,h3,h4,h5,h6,td,th,li',
'classes' =>'text-center'
],
[
'selector' => 'div,ul,ol,table,img,figure',
'classes' =>'center'
]
],
'alignright' => [
[
'selector' => 'p,h1,h2,h3,h4,h5,h6,td,th,li',
'classes' =>'text-right'
],
[
'selector' => 'div,ul,ol,table,img,figure',
'classes' =>'right'
]
],
'alignjustify' => [
[
'selector' => 'p,h1,h2,h3,h4,h5,h6,td,th,li',
'classes' =>'text-justify'
],
],
],
'friendly_name' => '(Please set a friendly name for this config)',
'priority' => 0, // used for Per-member config override
'browser_spellcheck' => true,
@ -230,7 +268,7 @@ class TinyMCEConfig extends HTMLEditorConfig
'menubar' => false,
'language' => 'en',
'branding' => false,
);
];
/**
* Holder list of enabled plugins