├── .gitattributes ├── .gitignore ├── README.md ├── _config.yml ├── app.css ├── composer.json ├── delete_file.php ├── delete_image.php ├── delete_video.php ├── index.php ├── load_images.php ├── upload_file.php ├── upload_file_validation.php ├── upload_image.php ├── upload_image_resize.php ├── upload_image_validation.php └── upload_video.php /.gitattributes: -------------------------------------------------------------------------------- 1 | .travis.yml export-ignore 2 | deploy_sdk.sh export-ignore 3 | docker-compose.yml.template export-ignore 4 | Dockerfile export-ignore 5 | push-image-to-nexus.sh export-ignore 6 | version.json export-ignore -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | uploads/ 2 | composer.lock 3 | vendor/ 4 | **/.DS_STORE 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Example for using Froala WYSIWYG Editor PHP SDK 2 | 3 | Easing the [Froala WYSIWYG HTML Editor](https://github.com/froala/wysiwyg-editor) server side integration in PHP projects. 4 | 5 | ## Dependencies 6 | 7 | PHP version >= 5.4.0 is required. 8 | 9 | The following PHP extensions are required: 10 | 11 | * fileinfo 12 | * imagick 13 | 14 | ## Setup Instructions 15 | 1. Install composer within the example directory. You can find instructions on how to install composer on composer’s website (https://getcomposer.org/download/) 16 | 2. Add Froala WYSIWYG Editor PHP SDK in your compose.json file 17 | 18 | { 19 | "require" : { 20 | "froala/wysiwyg-editor-php-sdk" : "" 21 | } 22 | } 23 | 3. Run composer: 24 | 25 | php composer.phar install 26 | 27 | Or if you installed composer globally: 28 | 29 | composer install 30 | 4. Before running the application, create 'uploads' folder at wamp www root directory 31 | 32 | ## Documentation 33 | 34 | * [Official documentation](https://www.froala.com/wysiwyg-editor/docs/sdks/php) 35 | 36 | ## Help 37 | - Found a bug or have some suggestions? Just submit an issue. 38 | - Having trouble with your integration? [Contact Froala Support team](http://froala.dev/wysiwyg-editor/contact). 39 | 40 | ## License 41 | 42 | The Froala WYSIWYG Editor PHP SDK is licensed under MIT license. However, in order to use Froala WYSIWYG HTML Editor plugin you should purchase a license for it. 43 | 44 | Froala Editor has [3 different licenses](http://froala.com/wysiwyg-editor/pricing) for commercial use. 45 | For details please see [License Agreement](http://froala.com/wysiwyg-editor/terms). 46 | 47 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 20px; 3 | } 4 | 5 | .sample { 6 | padding-bottom: 50px; 7 | margin-left: 30px; 8 | border-top: 1px solid lightgray; 9 | } 10 | 11 | .manual { 12 | margin-bottom: 20px; 13 | } -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "froala/wysiwyg-editor-php-sdk-example", 3 | "require": { 4 | "components/jquery": ">=1.11.0", 5 | "fortawesome/font-awesome": ">=4.4.0", 6 | "froala/wysiwyg-editor": ">=4.5.2", 7 | "froala/wysiwyg-editor-php-sdk": "4.5.2" 8 | }, 9 | "support": { 10 | "issues": "https://github.com/froala/froala-editor-php-sdk/issues", 11 | "source": "https://www.froala.com/wysiwyg-editor" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /delete_file.php: -------------------------------------------------------------------------------- 1 | getMessage(); 17 | http_response_code(404); 18 | } -------------------------------------------------------------------------------- /delete_image.php: -------------------------------------------------------------------------------- 1 | getMessage(); 18 | http_response_code(404); 19 | } -------------------------------------------------------------------------------- /delete_video.php: -------------------------------------------------------------------------------- 1 | getMessage(); 18 | http_response_code(404); 19 | } -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 'Europe/Bucharest', 22 | 'bucket' => $bucket, 23 | 'region' => $region, 24 | 'keyStart' => $keyStart, 25 | 'acl' => $acl, 26 | 'accessKey' => $accessKeyId, 27 | 'secretKey' => $secretKey 28 | ); 29 | 30 | $hash = FroalaEditor_S3::getHash($config); 31 | $hash = stripslashes(json_encode($hash)); 32 | 33 | ?> 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |