ckeditor.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. CKEditor Installation
  2. =====================
  3. The CKEditor source is not shipped with the bundle due to license restriction
  4. (GPL, LGPL and MPL) whereas the bundle relies on the MIT one which are not
  5. compatible together. To install CKEditor source, you can use the built-in
  6. Symfony command.
  7. Composer Script
  8. ---------------
  9. The easiest way to manage CKEditor installation and update is to integrate it
  10. at the middle of your composer routine (after the cache clear but before the
  11. assets installation).
  12. .. code-block:: json
  13. {
  14. "scripts": {
  15. "auto-scripts": {
  16. "cache:clear": "symfony-cmd",
  17. "ckeditor:install --clear=drop": "symfony-cmd",
  18. "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
  19. },
  20. "post-install-cmd": [
  21. "@auto-scripts"
  22. ],
  23. "post-update-cmd": [
  24. "@auto-scripts"
  25. ]
  26. }
  27. }
  28. Symfony Command
  29. ---------------
  30. .. code-block:: bash
  31. $ php bin/console ckeditor:install
  32. By default, the command downloads the latest CKEditor full release (samples
  33. directory excluded) in the ``Resource/public`` directory of the bundle. Most of
  34. the time, this is exactly what you want but the command allows you to do more.
  35. Download Path
  36. ~~~~~~~~~~~~~
  37. If you don't want to download CKEditor in the ``Resource/public`` directory of
  38. the bundle, you can use a custom path (absolute):
  39. .. code-block:: bash
  40. $ php bin/console ckeditor:install /var/www/html/web/ckeditor
  41. CKEditor Release
  42. ~~~~~~~~~~~~~~~~
  43. You can choose which CKEditor release (full, standard or basic) to download:
  44. .. code-block:: bash
  45. $ php bin/console ckeditor:install --release=basic
  46. CKEditor Custom Build
  47. ~~~~~~~~~~~~~~~~~~~~~
  48. It's also possible to use custom build generated using CKEditor online builder:
  49. https://ckeditor.com/cke4/builder. Download ZIP archive from CKEditor website
  50. and use your custom build ID from `build-config.js` file:
  51. .. code-block:: bash
  52. $ php bin/console ckeditor:install --release=custom --custom-build-id=574a82a0d3e9226d94b0e91d10eaa372
  53. CKEditor Version
  54. ~~~~~~~~~~~~~~~~
  55. If your want a specific CKEditor version, you can use:
  56. .. code-block:: bash
  57. $ php bin/console ckeditor:install --tag=4.6.0
  58. Silence Progress bars
  59. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  60. While downloading files necessary for the install, a progress bar will be shown
  61. by default, if you would prefer hiding it, use:
  62. .. code-block:: bash
  63. $ php bin/console ckeditor:install --no-progress-bar
  64. Clear Previous Installation
  65. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  66. By default, the command will ask you what to do when there is a previous CKEditor
  67. installation detected but in non interactive mode, you can control automatically
  68. how to handle such case:
  69. .. code-block:: bash
  70. $ php bin/console ckeditor:install --clear=drop
  71. $ php bin/console ckeditor:install --clear=keep
  72. $ php bin/console ckeditor:install --clear=skip
  73. - ``drop``: Drop the previous installation & install.
  74. - ``keep``: Keep the previous installation & install by overriding files.
  75. - ``skip``: Keep the previous installation & skip install.
  76. Path Exclusion
  77. ~~~~~~~~~~~~~~
  78. When extracting the downloaded CKEditor ZIP archive, you can exclude paths
  79. such as samples, adapters, whatever:
  80. .. code-block:: bash
  81. $ php bin/console ckeditor:install --exclude=samples --exclude=adapters
  82. Proxy
  83. ~~~~~
  84. If you're using a proxy, you can use the following environment variables:
  85. .. code-block:: bash
  86. $ export HTTP_PROXY=http://127.0.0.1:8080
  87. $ export HTTPS_PROXY=http://127.0.0.1:8080
  88. You can also define if the request URI should be full with:
  89. .. code-block:: bash
  90. $ export HTTP_PROXY_REQUEST_FULLURI=true
  91. $ export HTTPS_PROXY_REQUEST_FULLURI=true
  92. Reminder
  93. ~~~~~~~~
  94. The command has been well documented, if you want to check it out:
  95. .. code-block:: bash
  96. $ php bin/console ckeditor:install --help