You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
10 years ago | |
|---|---|---|
| .. | ||
| images | 12 years ago | |
| uploadcare-php | 11 years ago | |
| README.md | 11 years ago | |
| config.js | 10 years ago | |
| config.php | 11 years ago | |
| dialog.php | 11 years ago | |
README.md
Uploadcare CKEDITOR Plugin
This is a plugin for CKEDITOR to work with Uploadcare.
It's based on a uploadcare-php library.
Requirements
- CKEDITOR 4.0+
- PHP 5.2+
- iframedialog plugin for CKEDITOR
- php-curl
Install
Install iframedialog plugin.
Clone plugin from git to your plugins directory:
git clone git://github.com/uploadcare/uploadcare-ckeditor.git plugins/uploadcare --recursive
Find a "config.php" file inside plugin directory and edit it:
<?php
define('UC_PUBLIC_KEY', 'demopublickey');
define('UC_SECRET_KEY', 'demoprivatekey');
Find a "config.js" file an edit it:
var UPLOADCARE_PUBLIC_KEY = "demopublickey";
Initialize a CKEDITOR plugin with additional params:
<script>
CKEDITOR.replace( 'editor1', {
extraPlugins: 'uploadcare', // this will enable plugin
toolbar: [
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', '-', 'Uploadcare' ]
]
});
</script>
Usage
- Press "Uploadcare" button.
- Select a file to upload.
- Wait for file to be uploaded. An "Uploadcare" icon will show upload progress.
- Change any parameters you like.
- Press "Insert" and an image will be available inside editor.