Download the PHP package hashmode/cakephp-tinymce-elfinder without Composer
On this page you can find all versions of the php package hashmode/cakephp-tinymce-elfinder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cakephp-tinymce-elfinder
Cakephp-Tinymce-Elfinder
Elfinder file manager integration with tinymce 4.x for cakephp 3.x - allows to upload/access images/files as into local file system, as well as Amazon S3, remote FTP server etc.
For cakephp 2.x - https://github.com/hashmode/Tinymce-Image-Upload-Cakephp
REQUIREMENTS
- Cakephp 3.x
- Elfinder 2.x (currently 2.1) https://github.com/Studio-42/elFinder
- Tinymce 4.x (might work with 3.x as well)
Installation
1) Installation is done by composer: add the following into your main composer.json
(inside require) and then run composer update
Elfinder requirement is added inside plugin's composer, so it will automatically install it, however Tinymce should be installed separately: as well as jquery ui, upon which the Elfinder is dependent on.
Because the statics files that are accessed inside the plugin's view files - are required to be in webroot directory, that is why after installation/update composer script based on callback should copy the static files from elfinder's folder to the plugin's webroot, for this reason the following should be added inside application's main composer.json
file
2) Load Plugin from bootstrap.php
3) Add configuration options into bootstrap.php
(or you can create another file and include it in bootstrap)
client_options: This is the list of options that is being used initiating the elfinder in javascript. https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
static_files: Jquery min
and Jquery UI
are necessary for elfinder to work, so they are being used in the plugin view, however to avoid copying them into plugin's webroot or application's webroot(maybe you are already using them) - it is just omitted and it is required to provide paths to css and js files for jquery min js, jquery ui min js and jquery ui css. Jquery ui theme's css is optional. These files should reside in your application's webroot directory (or any plugins webroot directory - in that case you should use plugin syntax http://book.cakephp.org/3.0/en/appendices/glossary.html#term-plugin-syntax)
options: https://github.com/Studio-42/elFinder/wiki/Client-configuration-options-2.1
4) Load Plugin's helper - by adding the following into your AppView.php
initialize
5) Include tinymce into your page (Tinymce is NOT being installed with the plugin)
6) By this line it will define a js function for file_browser_callback
for tinymce
7) Tinymce Init
IMPORTANT !! - SECURITY
By default all the commands are allowed - so if you need to allow only specific commands - make sure to add the rest of the commands(that should NOT be allowed) under disabled
under options' roots.
https://github.com/Studio-42/elFinder/wiki/Client-Server-API-2.1#command-list
There are 2 actions in ElfindersController.php
controller of the plugin, that are used for the functionality of elfinder, corresponding access permissions should be handled manually from the application.
License
MIT - Please refer to Elfidner and Tinymce websites for their licenses