You are here

public function CKEditor::buildContentsCssJSSetting in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/ckeditor/src/Plugin/Editor/CKEditor.php \Drupal\ckeditor\Plugin\Editor\CKEditor::buildContentsCssJSSetting()

Builds the "contentsCss" configuration part of the CKEditor JS settings.

Parameters

\Drupal\editor\Entity\Editor $editor: A configured text editor object.

Return value

array An array containing the "contentsCss" configuration.

See also

getJSSettings()

1 call to CKEditor::buildContentsCssJSSetting()
CKEditor::getJSSettings in core/modules/ckeditor/src/Plugin/Editor/CKEditor.php
Returns JavaScript settings to be attached.

File

core/modules/ckeditor/src/Plugin/Editor/CKEditor.php, line 415
Contains \Drupal\ckeditor\Plugin\Editor\CKEditor.

Class

CKEditor
Defines a CKEditor-based text editor for Drupal.

Namespace

Drupal\ckeditor\Plugin\Editor

Code

public function buildContentsCssJSSetting(EditorEntity $editor) {
  $css = array(
    drupal_get_path('module', 'ckeditor') . '/css/ckeditor-iframe.css',
    drupal_get_path('module', 'system') . '/css/components/align.module.css',
  );
  $this->moduleHandler
    ->alter('ckeditor_css', $css, $editor);
  $css = array_merge($css, _ckeditor_theme_css());
  $css = array_map('file_create_url', $css);
  return array_values($css);
}