8
0
Просмотр исходного кода

Make Link and Image required plugins for CKFinderEditing.

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
b1d6a1ee53

+ 2 - 2
packages/ckeditor5-ckfinder/package.json

@@ -12,14 +12,14 @@
   "dependencies": {
   "dependencies": {
     "@ckeditor/ckeditor5-adapter-ckfinder": "^11.0.5",
     "@ckeditor/ckeditor5-adapter-ckfinder": "^11.0.5",
     "@ckeditor/ckeditor5-core": "^12.3.0",
     "@ckeditor/ckeditor5-core": "^12.3.0",
+    "@ckeditor/ckeditor5-image": "^14.0.0",
+    "@ckeditor/ckeditor5-link": "^11.1.2",
     "@ckeditor/ckeditor5-ui": "^14.0.0"
     "@ckeditor/ckeditor5-ui": "^14.0.0"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@ckeditor/ckeditor5-editor-classic": "^12.1.4",
     "@ckeditor/ckeditor5-editor-classic": "^12.1.4",
     "@ckeditor/ckeditor5-clipboard": "^12.0.2",
     "@ckeditor/ckeditor5-clipboard": "^12.0.2",
     "@ckeditor/ckeditor5-engine": "^14.0.0",
     "@ckeditor/ckeditor5-engine": "^14.0.0",
-    "@ckeditor/ckeditor5-image": "^14.0.0",
-    "@ckeditor/ckeditor5-link": "^11.1.2",
     "@ckeditor/ckeditor5-paragraph": "^11.0.5",
     "@ckeditor/ckeditor5-paragraph": "^11.0.5",
     "@ckeditor/ckeditor5-utils": "^14.0.0",
     "@ckeditor/ckeditor5-utils": "^14.0.0",
     "eslint": "^5.5.0",
     "eslint": "^5.5.0",

+ 3 - 1
packages/ckeditor5-ckfinder/src/ckfinderediting.js

@@ -8,6 +8,8 @@
  */
  */
 
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
+import Image from '@ckeditor/ckeditor5-image/src/image';
+import Link from '@ckeditor/ckeditor5-link/src/link';
 import Notification from '@ckeditor/ckeditor5-ui/src/notification/notification';
 import Notification from '@ckeditor/ckeditor5-ui/src/notification/notification';
 
 
 import CKFinderCommand from './ckfindercommand';
 import CKFinderCommand from './ckfindercommand';
@@ -29,7 +31,7 @@ export default class CKFinderEditing extends Plugin {
 	 * @inheritDoc
 	 * @inheritDoc
 	 */
 	 */
 	static get requires() {
 	static get requires() {
-		return [ Notification ];
+		return [ Notification, Image, Link ];
 	}
 	}
 
 
 	/**
 	/**

+ 10 - 0
packages/ckeditor5-ckfinder/tests/ckfinderediting.js

@@ -6,6 +6,8 @@
 import Command from '@ckeditor/ckeditor5-core/src/command';
 import Command from '@ckeditor/ckeditor5-core/src/command';
 import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
+import Image from '@ckeditor/ckeditor5-image/src/image';
+import Link from '@ckeditor/ckeditor5-link/src/link';
 import Notification from '@ckeditor/ckeditor5-ui/src/notification/notification';
 import Notification from '@ckeditor/ckeditor5-ui/src/notification/notification';
 import global from '@ckeditor/ckeditor5-utils/src/dom/global';
 import global from '@ckeditor/ckeditor5-utils/src/dom/global';
 
 
@@ -45,6 +47,14 @@ describe( 'CKFinderEditing', () => {
 		expect( editor.plugins.get( Notification ) ).to.instanceOf( Notification );
 		expect( editor.plugins.get( Notification ) ).to.instanceOf( Notification );
 	} );
 	} );
 
 
+	it( 'should load Image plugin', () => {
+		expect( editor.plugins.get( Image ) ).to.instanceOf( Image );
+	} );
+
+	it( 'should load Link plugin', () => {
+		expect( editor.plugins.get( Link ) ).to.instanceOf( Link );
+	} );
+
 	it( 'should register command', () => {
 	it( 'should register command', () => {
 		const command = editor.commands.get( 'ckfinder' );
 		const command = editor.commands.get( 'ckfinder' );