Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-ckfinder

Package Overview
Dependencies
Maintainers
1
Versions
694
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-ckfinder - npm Package Compare versions

Comparing version 28.0.0 to 29.0.0

2

build/ckfinder.js

@@ -5,2 +5,2 @@ /*!

*/
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.ckfinder=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(2)("./src/core.js")},function(e,t,n){e.exports=n(2)("./src/ui.js")},function(e,t){e.exports=CKEditor5.dll},function(e,t,n){e.exports=n(2)("./src/utils.js")},function(e,t,n){"use strict";n.r(t),n.d(t,"CKFinder",(function(){return u})),n.d(t,"CKFinderEditing",(function(){return a})),n.d(t,"CKFinderUI",(function(){return r}));var i=n(0),o=n(1);class r extends i.Plugin{static get pluginName(){return"CKFinderUI"}init(){const e=this.editor,t=e.ui.componentFactory,n=e.t;t.add("ckfinder",t=>{const i=e.commands.get("ckfinder"),r=new o.ButtonView(t);return r.set({label:n("Insert image or file"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',tooltip:!0}),r.bind("isEnabled").to(i),r.on("execute",()=>{e.execute("ckfinder"),e.editing.view.focus()}),r})}}var s=n(3);class c extends i.Command{constructor(e){super(e),this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");this.isEnabled=e.isEnabled||t.isEnabled}execute(){const e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new s.CKEditorError("ckfinder-unknown-openermethod",e);const n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;const i=n.onInit;n.language||(n.language=e.locale.uiLanguage),n.onInit=t=>{i&&i(t),t.on("files:choose",n=>{const i=n.data.files.toArray(),o=i.filter(e=>!e.isImage()),r=i.filter(e=>e.isImage());for(const t of o)e.execute("link",t.getUrl());const s=[];for(const e of r){const n=e.getUrl();s.push(n||t.request("file:getProxyUrl",{file:e}))}s.length&&d(e,s)}),t.on("file:choose:resizedImage",t=>{const n=t.data.resizedUrl;if(n)d(e,[n]);else{const t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("Could not obtain resized image URL."),{title:n("Selecting resized image failed"),namespace:"ckfinder"})}})},window.CKFinder[t](n)}}function d(e,t){if(e.commands.get("insertImage").isEnabled)e.execute("insertImage",{source:t});else{const t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("Could not insert image at the current position."),{title:n("Inserting image failed"),namespace:"ckfinder"})}}class a extends i.Plugin{static get pluginName(){return"CKFinderEditing"}static get requires(){return[o.Notification,"ImageEditing","LinkEditing"]}init(){const e=this.editor;e.commands.add("ckfinder",new c(e))}}class u extends i.Plugin{static get pluginName(){return"CKFinder"}static get requires(){return["Image","Link","CKFinderUploadAdapter",a,r]}}}]);
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.ckfinder=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(3)("./src/core.js")},function(e,t,n){e.exports=n(3)("./src/ui.js")},function(e,t,n){e.exports=n(3)("./src/utils.js")},function(e,t){e.exports=CKEditor5.dll},function(e,t,n){"use strict";n.r(t),n.d(t,"CKFinder",(function(){return l})),n.d(t,"CKFinderEditing",(function(){return a})),n.d(t,"CKFinderUI",(function(){return o}));var i=n(0),r=n(1);class o extends i.Plugin{static get pluginName(){return"CKFinderUI"}init(){const e=this.editor,t=e.ui.componentFactory,n=e.t;t.add("ckfinder",t=>{const i=e.commands.get("ckfinder"),o=new r.ButtonView(t);return o.set({label:n("Insert image or file"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',tooltip:!0}),o.bind("isEnabled").to(i),o.on("execute",()=>{e.execute("ckfinder"),e.editing.view.focus()}),o})}}var s=n(2);class c extends i.Command{constructor(e){super(e),this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");this.isEnabled=e.isEnabled||t.isEnabled}execute(){const e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new s.CKEditorError("ckfinder-unknown-openermethod",e);const n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;const i=n.onInit;n.language||(n.language=e.locale.uiLanguage),n.onInit=t=>{i&&i(t),t.on("files:choose",n=>{const i=n.data.files.toArray(),r=i.filter(e=>!e.isImage()),o=i.filter(e=>e.isImage());for(const t of r)e.execute("link",t.getUrl());const s=[];for(const e of o){const n=e.getUrl();s.push(n||t.request("file:getProxyUrl",{file:e}))}s.length&&d(e,s)}),t.on("file:choose:resizedImage",t=>{const n=t.data.resizedUrl;if(n)d(e,[n]);else{const t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("Could not obtain resized image URL."),{title:n("Selecting resized image failed"),namespace:"ckfinder"})}})},window.CKFinder[t](n)}}function d(e,t){if(e.commands.get("insertImage").isEnabled)e.execute("insertImage",{source:t});else{const t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("Could not insert image at the current position."),{title:n("Inserting image failed"),namespace:"ckfinder"})}}class a extends i.Plugin{static get pluginName(){return"CKFinderEditing"}static get requires(){return[r.Notification,"LinkEditing"]}init(){const e=this.editor;if(!e.plugins.has("ImageBlockEditing")&&!e.plugins.has("ImageInlineEditing"))throw new s.CKEditorError("ckfinder-missing-image-plugin",e);e.commands.add("ckfinder",new c(e))}}class l extends i.Plugin{static get pluginName(){return"CKFinder"}static get requires(){return["Link","CKFinderUploadAdapter",a,o]}}}]);
{
"name": "@ckeditor/ckeditor5-ckfinder",
"version": "28.0.0",
"version": "29.0.0",
"description": "CKFinder integration for CKEditor 5.",

@@ -14,17 +14,17 @@ "keywords": [

"dependencies": {
"ckeditor5": "^28.0.0"
"ckeditor5": "^29.0.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-adapter-ckfinder": "^28.0.0",
"@ckeditor/ckeditor5-clipboard": "^28.0.0",
"@ckeditor/ckeditor5-core": "^28.0.0",
"@ckeditor/ckeditor5-adapter-ckfinder": "^29.0.0",
"@ckeditor/ckeditor5-clipboard": "^29.0.0",
"@ckeditor/ckeditor5-core": "^29.0.0",
"@ckeditor/ckeditor5-dev-utils": "^25.0.0",
"@ckeditor/ckeditor5-editor-classic": "^28.0.0",
"@ckeditor/ckeditor5-engine": "^28.0.0",
"@ckeditor/ckeditor5-image": "^28.0.0",
"@ckeditor/ckeditor5-link": "^28.0.0",
"@ckeditor/ckeditor5-paragraph": "^28.0.0",
"@ckeditor/ckeditor5-theme-lark": "^28.0.0",
"@ckeditor/ckeditor5-ui": "^28.0.0",
"@ckeditor/ckeditor5-utils": "^28.0.0",
"@ckeditor/ckeditor5-editor-classic": "^29.0.0",
"@ckeditor/ckeditor5-engine": "^29.0.0",
"@ckeditor/ckeditor5-image": "^29.0.0",
"@ckeditor/ckeditor5-link": "^29.0.0",
"@ckeditor/ckeditor5-paragraph": "^29.0.0",
"@ckeditor/ckeditor5-theme-lark": "^29.0.0",
"@ckeditor/ckeditor5-ui": "^29.0.0",
"@ckeditor/ckeditor5-utils": "^29.0.0",
"webpack": "^4.43.0",

@@ -31,0 +31,0 @@ "webpack-cli": "^3.3.11"

@@ -5,4 +5,4 @@ CKEditor 5's CKFinder integration

[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-ckfinder.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-ckfinder)
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-ckfinder/status.svg)](https://david-dm.org/ckeditor/ckeditor5-ckfinder)
[![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-ckfinder/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-ckfinder?type=dev)
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
[![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://travis-ci.com/ckeditor/ckeditor5)

@@ -9,0 +9,0 @@ 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 CKEditor 5 WYSIWYG editor and [CKFinder file manager and uploader](https://ckeditor.com/ckfinder).

@@ -25,6 +25,6 @@ /**

*
* See the {@glink features/image-upload/ckfinder "CKFinder integration" guide} to learn how to configure
* See the {@glink features/images/image-upload/ckfinder "CKFinder integration" guide} to learn how to configure
* and use this feature.
*
* Check out the {@glink features/image-upload/image-upload comprehensive "Image upload" guide} to learn about
* Check out the {@glink features/images/image-upload/image-upload comprehensive "Image upload" guide} to learn about
* other ways to upload images into CKEditor 5.

@@ -46,3 +46,3 @@ *

static get requires() {
return [ 'Image', 'Link', 'CKFinderUploadAdapter', CKFinderEditing, CKFinderUI ];
return [ 'Link', 'CKFinderUploadAdapter', CKFinderEditing, CKFinderUI ];
}

@@ -49,0 +49,0 @@ }

@@ -12,2 +12,3 @@ /**

import { Notification } from 'ckeditor5/src/ui';
import { CKEditorError } from 'ckeditor5/src/utils';

@@ -33,3 +34,3 @@ import CKFinderCommand from './ckfindercommand';

static get requires() {
return [ Notification, 'ImageEditing', 'LinkEditing' ];
return [ Notification, 'LinkEditing' ];
}

@@ -43,4 +44,20 @@

if ( !editor.plugins.has( 'ImageBlockEditing' ) && !editor.plugins.has( 'ImageInlineEditing' ) ) {
/**
* CKFinder requires at least one plugin providing support for images loaded in the editor. Please
* make sure either:
*
* * {@link module:image/image~Image} (which loads both types of images),
* * or {@link module:image/imageblock~ImageBlock},
* * or {@link module:image/imageinline~ImageInline}.
*
* is loaded in your editor configuration.
*
* @error ckfinder-missing-image-plugin
*/
throw new CKEditorError( 'ckfinder-missing-image-plugin', editor );
}
editor.commands.add( 'ckfinder', new CKFinderCommand( editor ) );
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc