Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / ckeditor / ckeditor.api.php
1 <?php
2
3 /**
4  * @file
5  * Documentation for CKEditor module APIs.
6  */
7
8 use Drupal\editor\Entity\Editor;
9
10 /**
11  * @addtogroup hooks
12  * @{
13  */
14
15 /**
16  * Modify the list of available CKEditor plugins.
17  *
18  * This hook may be used to modify plugin properties after they have been
19  * specified by other modules.
20  *
21  * @param $plugins
22  *   An array of all the existing plugin definitions, passed by reference.
23  *
24  * @see \Drupal\ckeditor\CKEditorPluginManager
25  */
26 function hook_ckeditor_plugin_info_alter(array &$plugins) {
27   $plugins['someplugin']['label'] = t('Better name');
28 }
29
30 /**
31  * Modify the list of CSS files that will be added to a CKEditor instance.
32  *
33  * Modules may use this hook to provide their own custom CSS file without
34  * providing a CKEditor plugin. This list of CSS files is only used in the
35  * iframe versions of CKEditor.
36  *
37  * Front-end themes (and base themes) can easily specify CSS files to be used in
38  * iframe instances of CKEditor through an entry in their .info.yml file:
39  *
40  * @code
41  * ckeditor_stylesheets:
42  *   - css/ckeditor-iframe.css
43  * @endcode
44  *
45  * @param array &$css
46  *   An array of CSS files, passed by reference. This is a flat list of file
47  *   paths which can be either relative to the Drupal root or external URLs.
48  * @param $editor
49  *   The text editor object as returned by editor_load(), for which these files
50  *   are being loaded. Based on this information, it is possible to load the
51  *   corresponding text format object.
52  *
53  * @see _ckeditor_theme_css()
54  */
55 function hook_ckeditor_css_alter(array &$css, Editor $editor) {
56   $css[] = drupal_get_path('module', 'mymodule') . '/css/mymodule-ckeditor.css';
57 }
58
59 /**
60  * @} End of "addtogroup hooks".
61  */