You are here

README.txt in CKEditor CodeMirror 7

Same filename and directory in other branches
  1. 8 README.txt
INTRODUCTION
------------

CKEditor CodeMirror module adds syntax highlighting for "Source View" in
CKEditor WYSIWYG editor using CodeMirror Plugin https://w8tcha.github.io/CKEdito
r-CodeMirror-Plugin.


INTEGRATION WITH CKEDITOR MODULE
--------------------------------

DEPENDENCIES
------------
- CKEditor module https://www.drupal.org/project/ckeditor
- Libraries API (2.x) module https://www.drupal.org/project/libraries
- CKEditor-CodeMirror-Plugin library https://github.com/w8tcha/CKEditor-CodeMir
  ror-Plugin

INSTALLATION
------------
1. Download and install CKEditor and Libraries API modules.
2. Download and install CKEditor CodeMirror module.
3. Download CKEditor-CodeMirror-Plugin library to the following directory
   "sites/all/libraries/ckeditor.codemirror". Path to "plugin.js" file should be
   "sites/all/libraries/ckeditor.codemirror/plugin.js".
   Note: Latest version of module will offer to do this for you automatically.
   Use "drush ckeditor-codemirror-download" (or "drush ccmd") command
   to download the library.

CONFIGURATION
-------------
1. Go to "Administration » Configuration » Content authoring"
   (admin/config/content/ckeditor) page and edit any CKEditor profile.
2. Under "Editor appearance" section scroll down to "Plugins" list, enable
   "CodeMirror (Source) Syntax Highlighting" plugin. Make sure that the current
   toolbar has the "Source" button. Save the profile.
3. Go to node create/edit page, choose the text format with CodeMirror plugin.
   Press the "Source" button.

FAQ
---

- How to change CodeMirror theme?
  1. Select the theme on https://codemirror.net/demo/theme.html page.
  2. Go to "Administration » Configuration » Content authoring"
     (admin/config/content/ckeditor) page and edit CKEditor profile with
     CodeMirror plugin.
  3. Add the following text in "Custom JavaScript configuration" textfield
     under the "Advanced options" section:

     config.codemirror_theme = 'ambiance';

     Replace "ambiance" to selected theme.


INTEGRATION WITH WYSIWYG MODULE
-------------------------------

DEPENDENCIES
------------
- Wysiwyg module https://www.drupal.org/project/wysiwyg
- CKEditor-CodeMirror-Plugin library https://github.com/w8tcha/CKEditor-CodeMir
  ror-Plugin

INSTALLATION
------------
1. Download and install Wysiwyg module.
2. Download and install CKEditor CodeMirror Wysiwyg module.
3. Download CKEditor-CodeMirror-Plugin library to the following directory
   "sites/all/libraries/ckeditor.codemirror". Path to "plugin.js" file should be
   "sites/all/libraries/ckeditor.codemirror/plugin.js".

CONFIGURATION
-------------
1. Enable CKEditor editor for at least one profile on "admin/config/content/
   wysiwyg" page.
2. Edit Wysiwyg profile and enable "CodeMirror: Source" button.

File

README.txt
View source
  1. INTRODUCTION
  2. ------------
  3. CKEditor CodeMirror module adds syntax highlighting for "Source View" in
  4. CKEditor WYSIWYG editor using CodeMirror Plugin https://w8tcha.github.io/CKEdito
  5. r-CodeMirror-Plugin.
  6. INTEGRATION WITH CKEDITOR MODULE
  7. --------------------------------
  8. DEPENDENCIES
  9. ------------
  10. - CKEditor module https://www.drupal.org/project/ckeditor
  11. - Libraries API (2.x) module https://www.drupal.org/project/libraries
  12. - CKEditor-CodeMirror-Plugin library https://github.com/w8tcha/CKEditor-CodeMir
  13. ror-Plugin
  14. INSTALLATION
  15. ------------
  16. 1. Download and install CKEditor and Libraries API modules.
  17. 2. Download and install CKEditor CodeMirror module.
  18. 3. Download CKEditor-CodeMirror-Plugin library to the following directory
  19. "sites/all/libraries/ckeditor.codemirror". Path to "plugin.js" file should be
  20. "sites/all/libraries/ckeditor.codemirror/plugin.js".
  21. Note: Latest version of module will offer to do this for you automatically.
  22. Use "drush ckeditor-codemirror-download" (or "drush ccmd") command
  23. to download the library.
  24. CONFIGURATION
  25. -------------
  26. 1. Go to "Administration » Configuration » Content authoring"
  27. (admin/config/content/ckeditor) page and edit any CKEditor profile.
  28. 2. Under "Editor appearance" section scroll down to "Plugins" list, enable
  29. "CodeMirror (Source) Syntax Highlighting" plugin. Make sure that the current
  30. toolbar has the "Source" button. Save the profile.
  31. 3. Go to node create/edit page, choose the text format with CodeMirror plugin.
  32. Press the "Source" button.
  33. FAQ
  34. ---
  35. - How to change CodeMirror theme?
  36. 1. Select the theme on https://codemirror.net/demo/theme.html page.
  37. 2. Go to "Administration » Configuration » Content authoring"
  38. (admin/config/content/ckeditor) page and edit CKEditor profile with
  39. CodeMirror plugin.
  40. 3. Add the following text in "Custom JavaScript configuration" textfield
  41. under the "Advanced options" section:
  42. config.codemirror_theme = 'ambiance';
  43. Replace "ambiance" to selected theme.
  44. INTEGRATION WITH WYSIWYG MODULE
  45. -------------------------------
  46. DEPENDENCIES
  47. ------------
  48. - Wysiwyg module https://www.drupal.org/project/wysiwyg
  49. - CKEditor-CodeMirror-Plugin library https://github.com/w8tcha/CKEditor-CodeMir
  50. ror-Plugin
  51. INSTALLATION
  52. ------------
  53. 1. Download and install Wysiwyg module.
  54. 2. Download and install CKEditor CodeMirror Wysiwyg module.
  55. 3. Download CKEditor-CodeMirror-Plugin library to the following directory
  56. "sites/all/libraries/ckeditor.codemirror". Path to "plugin.js" file should be
  57. "sites/all/libraries/ckeditor.codemirror/plugin.js".
  58. CONFIGURATION
  59. -------------
  60. 1. Enable CKEditor editor for at least one profile on "admin/config/content/
  61. wysiwyg" page.
  62. 2. Edit Wysiwyg profile and enable "CodeMirror: Source" button.