Drupal 8  8.0.2
CKEditor Class Reference
Inheritance diagram for CKEditor:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, CKEditorPluginManager $ckeditor_plugin_manager, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, RendererInterface $renderer)
 
 getDefaultSettings ()
 
 settingsForm (array $form, FormStateInterface $form_state, EditorEntity $editor)
 
 settingsFormSubmit (array $form, FormStateInterface $form_state)
 
 getJSSettings (EditorEntity $editor)
 
 getLangcodes ()
 
 getLibraries (EditorEntity $editor)
 
 buildToolbarJSSetting (EditorEntity $editor)
 
 buildContentsCssJSSetting (EditorEntity $editor)
 
- Public Member Functions inherited from EditorBase
 getDefaultSettings ()
 
 settingsForm (array $form, FormStateInterface $form_state, Editor $editor)
 
 settingsFormValidate (array $form, FormStateInterface $form_state)
 
 settingsFormSubmit (array $form, FormStateInterface $form_state)
 
- Public Member Functions inherited from EditorPluginInterface
 getJSSettings (Editor $editor)
 
 getLibraries (Editor $editor)
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 

Protected Attributes

 $moduleHandler
 
 $languageManager
 
 $ckeditorPluginManager
 
 $renderer
 

Detailed Description

Defines a CKEditor-based text editor for Drupal.

( id = "ckeditor", label = ("CKEditor"), supports_content_filtering = TRUE, supports_inline_editing = TRUE, is_xss_safe = FALSE, supported_element_types = { "textarea" } )

Constructor & Destructor Documentation

__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
CKEditorPluginManager  $ckeditor_plugin_manager,
ModuleHandlerInterface  $module_handler,
LanguageManagerInterface  $language_manager,
RendererInterface  $renderer 
)

Constructs a Drupal object.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\ckeditor\CKEditorPluginManager$ckeditor_plugin_managerThe CKEditor plugin manager.
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler to invoke hooks on.
\Drupal\Core\Language\LanguageManagerInterface$language_managerThe language manager.
\Drupal\Core\Render\RendererInterface$rendererThe renderer.

References Drupal\languageManager(), and Drupal\moduleHandler().

Here is the call graph for this function:

Member Function Documentation

buildContentsCssJSSetting ( EditorEntity  $editor)

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

See Also
getJSSettings()
Parameters
\Drupal\editor\Entity\Editor$editorA configured text editor object.
Returns
array An array containing the "contentsCss" configuration.

References Drupal\moduleHandler().

Referenced by CKEditor\getJSSettings().

Here is the call graph for this function:

Here is the caller graph for this function:

buildToolbarJSSetting ( EditorEntity  $editor)

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

See Also
getJSSettings()
Parameters
\Drupal\editor\Entity\Editor$editorA configured text editor object.
Returns
array An array containing the "toolbar" configuration.

Referenced by CKEditor\getJSSettings().

Here is the caller graph for this function:

static create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

{Creates an instance of the plugin.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
Returns
static Returns an instance of this plugin.
}

Implements ContainerFactoryPluginInterface.

getDefaultSettings ( )

{Returns the default settings for this configurable text editor.

Returns
array An array of settings as they would be stored by a configured text editor entity ().
}

Implements EditorPluginInterface.

References t().

Here is the call graph for this function:

getJSSettings ( EditorEntity  $editor)

{}

References CKEditor\buildContentsCssJSSetting(), CKEditor\buildToolbarJSSetting(), CKEditor\getLangcodes(), Drupal\languageManager(), and Drupal\moduleHandler().

Referenced by CKEditor\settingsForm().

Here is the call graph for this function:

Here is the caller graph for this function:

getLangcodes ( )

Returns a list of language codes supported by CKEditor.

Returns
array An associative array keyed by language codes.

References Drupal\cache(), and Drupal\moduleHandler().

Referenced by CKEditor\getJSSettings().

Here is the call graph for this function:

Here is the caller graph for this function:

getLibraries ( EditorEntity  $editor)

{}

settingsForm ( array  $form,
FormStateInterface  $form_state,
EditorEntity  $editor 
)

{}

References Element\children(), CKEditor\getJSSettings(), and t().

Here is the call graph for this function:

settingsFormSubmit ( array  $form,
FormStateInterface  $form_state 
)

{Modifies any values in the form state to prepare them for saving.Values in $form_state->getValue(array('editor', 'settings')) are saved by Editor module in editor_form_filter_admin_format_submit().

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
}

Implements EditorPluginInterface.

References FormStateInterface\getValue(), FormStateInterface\hasValue(), and FormStateInterface\unsetValue().

Here is the call graph for this function:


The documentation for this class was generated from the following file: