@ckeditor/ckeditor5-ckfinder
Advanced tools
Comparing version 0.0.1 to 10.0.0
{ | ||
"name": "@ckeditor/ckeditor5-ckfinder", | ||
"version": "0.0.1", | ||
"version": "10.0.0", | ||
"description": "CKFinder integration for CKEditor 5.", | ||
@@ -13,15 +13,15 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-adapter-ckfinder": "^10.0.3", | ||
"@ckeditor/ckeditor5-core": "^11.0.1", | ||
"@ckeditor/ckeditor5-ui": "^11.1.0", | ||
"@ckeditor/ckeditor5-widget": "^10.3.0" | ||
"@ckeditor/ckeditor5-adapter-ckfinder": "^10.0.4", | ||
"@ckeditor/ckeditor5-core": "^11.1.0", | ||
"@ckeditor/ckeditor5-ui": "^11.2.0", | ||
"@ckeditor/ckeditor5-widget": "^10.3.1" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-editor-classic": "^11.0.1", | ||
"@ckeditor/ckeditor5-cloud-services": "^10.1.0", | ||
"@ckeditor/ckeditor5-engine": "^11.0.0", | ||
"@ckeditor/ckeditor5-image": "^11.0.0", | ||
"@ckeditor/ckeditor5-link": "^10.0.4", | ||
"@ckeditor/ckeditor5-paragraph": "^10.0.3", | ||
"@ckeditor/ckeditor5-utils": "^11.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^11.0.2", | ||
"@ckeditor/ckeditor5-clipboard": "^10.0.4", | ||
"@ckeditor/ckeditor5-engine": "^12.0.0", | ||
"@ckeditor/ckeditor5-image": "^12.0.0", | ||
"@ckeditor/ckeditor5-link": "^10.1.0", | ||
"@ckeditor/ckeditor5-paragraph": "^10.0.4", | ||
"@ckeditor/ckeditor5-utils": "^11.1.0", | ||
"eslint": "^5.5.0", | ||
@@ -28,0 +28,0 @@ "eslint-config-ckeditor5": "^1.0.7", |
@@ -1,2 +0,2 @@ | ||
CKEditor 5 CKFinder with Cloud Services | ||
CKEditor 5's CKFinder integration | ||
========================================= | ||
@@ -13,8 +13,12 @@ | ||
This package implements the [CKFinder feature](https://ckeditor.com/docs/ckeditor5/latest/features/ckfinder.html). This feature allows you to easily insert images as well as links to files into the editor content. It is a bridge between the CKEditor 5 WYSIWYG editor and the [CKFinder file manager and uploader](https://ckeditor.com/ckfinder). | ||
## Documentation | ||
See the [`@ckeditor/ckeditor5-ckfinder` package](https://ckeditor.com/docs/ckeditor5/latest/api/ckfinder.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/). | ||
See the ["CKFinder integration" guide](https://ckeditor.com/docs/ckeditor5/latest/features/ckfinder.html) and the [plugin documentation](https://ckeditor.com/docs/ckeditor5/latest/api/ckfinder.html) to learn more about the integration. | ||
Check out the [comprehensive "Image upload" guide](https://ckeditor.com/docs/ckeditor5/latest/features/image-upload.html) to learn about other ways to upload images into CKEditor 5. | ||
## License | ||
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file. |
@@ -17,3 +17,4 @@ /** | ||
/** | ||
* The CKFinder feature. | ||
* The CKFinder feature, a bridge between the CKEditor 5 WYSIWYG editor and the | ||
* [CKFinder](https://ckeditor.com/ckfinder) file manager and uploader. | ||
* | ||
@@ -23,4 +24,11 @@ * This is a "glue" plugin which enables: | ||
* * {@link module:ckfinder/ckfinderediting~CKFinderEditing}, | ||
* * {@link module:ckfinder/ckfinderui~CKFinderUI}. | ||
* * {@link module:ckfinder/ckfinderui~CKFinderUI}, | ||
* * {@link module:adapter-ckfinder/uploadadapter~CKFinderUploadAdapter}. | ||
* | ||
* See the {@glink features/ckfinder "CKFinder integration" guide} to learn how to configure | ||
* and use this feature. | ||
* | ||
* Check out the {@glink features/image-upload comprehensive "Image upload" guide} to learn about | ||
* other ways to upload images into CKEditor 5. | ||
* | ||
* @extends module:core/plugin~Plugin | ||
@@ -53,3 +61,4 @@ */ | ||
/** | ||
* The configuration of the {@link module:ckfinder/ckfinder~CKFinderUploadAdapter CKFinder upload adapter}. | ||
* The configuration of the {@link module:ckfinder/ckfinder~CKFinder CKFinder feature} | ||
* and its {@link module:adapter-ckfinder/uploadadapter~CKFinderUploadAdapter upload adapter}. | ||
* | ||
@@ -62,6 +71,6 @@ * ClassicEditor | ||
* } | ||
* } | ||
* } | ||
* } ) | ||
* .then( ... ) | ||
.catch( ... ); | ||
* .catch( ... ); | ||
* | ||
@@ -74,4 +83,6 @@ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}. | ||
/** | ||
* The configuration options to pass to the CKFinder instance. | ||
* The configuration options passed to the CKFinder file manager instance. | ||
* | ||
* Check the file manager {@glink @ckfinder ckfinder3/#!/api/CKFinder.Config documentation} for the complete list of options. | ||
* | ||
* @member {Object} module:ckfinder/ckfinder~CKFinderConfig#options | ||
@@ -84,8 +95,30 @@ */ | ||
* Supported types are: | ||
* * `"modal"` - opens a CKFinder modal | ||
* * `"popup"` - opens a CKFinder popup window | ||
* | ||
* Defaults to "'modal'". | ||
* * `'modal'` - opens a CKFinder in a modal, | ||
* * `'popup'` - opens a CKFinder in a new "pop-up" window. | ||
* | ||
* Defaults to `'modal'`. | ||
* | ||
* @member {String} module:ckfinder/ckfinder~CKFinderConfig#openerMethod | ||
*/ | ||
/** | ||
* The path (URL) to the connector which handles the file upload in the CKFinder file manager. | ||
* When specified, enables the automatic upload of resources such as images inserted into the content. | ||
* | ||
* For instance, to use CKFinder's {@glink @ckfinder ckfinder3-php/commands.html#command_quick_upload quick upload} | ||
* command, your can use the following (or similar) path: | ||
* | ||
* ClassicEditor | ||
* .create( editorElement, { | ||
* ckfinder: { | ||
* uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json' | ||
* } | ||
* } ) | ||
* .then( ... ) | ||
* .catch( ... ); | ||
* | ||
* Used by the {@link module:adapter-ckfinder/uploadadapter~CKFinderUploadAdapter upload adapter}. | ||
* | ||
* @member {String} module:ckfinder/ckfinder~CKFinderConfig#uploadUrl | ||
*/ |
@@ -16,4 +16,2 @@ /** | ||
import { findOptimalInsertionPosition } from '@ckeditor/ckeditor5-widget/src/utils'; | ||
/** | ||
@@ -64,3 +62,3 @@ * The CKFinder command. It is used by the {@link module:ckfinder/ckfinderediting~CKFinderEditing ckfinder editng feature} | ||
const options = this.editor.config.get( 'ckfinder.options' ) || {}; | ||
const options = Object.assign( {}, this.editor.config.get( 'ckfinder.options' ) ); | ||
@@ -147,21 +145,3 @@ options.chooseFiles = true; | ||
const model = editor.model; | ||
// The first image will be inserted according to image inserting algorithm. Next one after the previous one. | ||
let insertAt = findOptimalInsertionPosition( model.document.selection, model ); | ||
model.change( writer => { | ||
for ( const url of urls ) { | ||
const imageElement = writer.createElement( 'image', { src: url } ); | ||
// Insert image & update the selection. | ||
model.insertContent( imageElement, insertAt ); | ||
// Inserting an image might've failed due to schema regulations. | ||
if ( imageElement.parent ) { | ||
writer.setSelection( imageElement, 'on' ); | ||
insertAt = writer.createPositionAfter( imageElement ); | ||
} | ||
} | ||
} ); | ||
editor.execute( 'imageInsert', { source: urls } ); | ||
} |
@@ -13,3 +13,3 @@ /** | ||
import ckfinderIcon from '@ckeditor/ckeditor5-ui/theme/icons/dropdown-arrow.svg'; | ||
import browseFilesIcon from '../theme/icons/browse-files.svg'; | ||
@@ -44,3 +44,3 @@ /** | ||
label: t( 'Insert image or file' ), | ||
icon: ckfinderIcon, | ||
icon: browseFilesIcon, | ||
tooltip: true | ||
@@ -47,0 +47,0 @@ } ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
29257
21
307
0
24