Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
300
Merge Requests
300
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
3c3692c8
Commit
3c3692c8
authored
Jul 21, 2015
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2536880
by alexpott: CKEditor admin form broken
parent
d3c33d58
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
+1
-1
core/modules/ckeditor/src/Tests/CKEditorAdminTest.php
core/modules/ckeditor/src/Tests/CKEditorAdminTest.php
+12
-0
No files found.
core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
View file @
3c3692c8
...
...
@@ -157,7 +157,7 @@ public function settingsForm(array $form, FormStateInterface $form_state, Editor
'library'
=>
array
(
'ckeditor/drupal.ckeditor.admin'
),
'drupalSettings'
=>
[
'ckeditor'
=>
[
'toolbarAdmin'
=>
$this
->
renderer
->
renderPlain
(
$ckeditor_settings_toolbar
),
'toolbarAdmin'
=>
(
string
)
$this
->
renderer
->
renderPlain
(
$ckeditor_settings_toolbar
),
],
],
),
...
...
core/modules/ckeditor/src/Tests/CKEditorAdminTest.php
View file @
3c3692c8
...
...
@@ -117,6 +117,18 @@ function testExistingFormat() {
$editor
=
entity_load
(
'editor'
,
'filtered_html'
);
$this
->
assertFalse
(
$editor
,
'No Editor config entity exists yet.'
);
// Ensure that drupalSettings is correct.
$ckeditor_settings_toolbar
=
array
(
'#theme'
=>
'ckeditor_settings_toolbar'
,
'#editor'
=>
Editor
::
create
([
'editor'
=>
'ckeditor'
]),
'#plugins'
=>
$this
->
container
->
get
(
'plugin.manager.ckeditor.plugin'
)
->
getButtons
(),
);
$this
->
assertEqual
(
$this
->
drupalSettings
[
'ckeditor'
][
'toolbarAdmin'
],
$this
->
container
->
get
(
'renderer'
)
->
renderPlain
(
$ckeditor_settings_toolbar
),
'CKEditor toolbar settings are rendered as part of drupalSettings.'
);
// Ensure the toolbar buttons configuration value is initialized to the
// expected default value.
$expected_buttons_value
=
json_encode
(
$expected_default_settings
[
'toolbar'
][
'rows'
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment