ckeditor.api.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * CKEditor - The text editor for the Internet - http://ckeditor.com
  4. * Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
  5. *
  6. * == BEGIN LICENSE ==
  7. *
  8. * Licensed under the terms of any of the following licenses of your
  9. * choice:
  10. *
  11. * - GNU General Public License Version 2 or later (the "GPL")
  12. * http://www.gnu.org/licenses/gpl.html
  13. *
  14. * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  15. * http://www.gnu.org/licenses/lgpl.html
  16. *
  17. * - Mozilla Public License Version 1.1 or later (the "MPL")
  18. * http://www.mozilla.org/MPL/MPL-1.1.html
  19. *
  20. * == END LICENSE ==
  21. *
  22. * @file
  23. * CKEditor Module for Drupal 7.x
  24. *
  25. * This module allows Drupal to replace textarea fields with CKEditor.
  26. *
  27. * CKEditor is an online rich text editor that can be embedded inside web pages.
  28. * It is a WYSIWYG (What You See Is What You Get) editor which means that the
  29. * text edited in it looks as similar as possible to the results end users will
  30. * see after the document gets published. It brings to the Web popular editing
  31. * features found in desktop word processors such as Microsoft Word and
  32. * OpenOffice.org Writer. CKEditor is truly lightweight and does not require any
  33. * kind of installation on the client computer.
  34. */
  35. /**
  36. * Hook to register the CKEditor plugin - it would appear in the plugins list on the profile setting page.
  37. */
  38. function hook_ckeditor_plugin() {
  39. return array(
  40. 'plugin_name' => array(
  41. // Name of the plugin used to write it.
  42. 'name' => 'plugin_name',
  43. // Description of the plugin - it would be displayed in the plugins management section of profile settings.
  44. 'desc' => t('Plugin description'),
  45. // The full path to the CKEditor plugins directory, with the trailing slash.
  46. 'path' => drupal_get_path('module', 'my_module') . '/plugin_dir/',
  47. 'buttons' => array(
  48. 'button_name' => array(
  49. 'icon' => 'path to button icon',
  50. 'label' => 'Button Label',
  51. )
  52. )
  53. )
  54. );
  55. }
  56. /**
  57. * Hook to register the CKEditor security filter - it would appear in the security filters list on the profile setting page.
  58. */
  59. function hook_ckeditor_security_filter() {
  60. return array(
  61. 'security_filter_name' => array(
  62. // Title of the security filter - it would be displayed in the security filters section of profile settings.
  63. 'title' => t('Security filter title'),
  64. // Description of the security filter - it would be displayed in the security filters section of profile settings.
  65. 'description' => t('Security filter description'),
  66. )
  67. );
  68. }
  69. ?>