8
0
Maciej Gołaszewski 7 лет назад
Родитель
Сommit
a699749f7e

+ 3 - 4
packages/ckeditor5-ckfinder/src/ckfindercommand.js

@@ -37,9 +37,9 @@ export default class CKFinderCommand extends Command {
 	execute() {
 		const editor = this.editor;
 
-		const method = this.editor.config.get( 'ckfinder.openerMethod' ) || 'modal';
+		const openerMethod = this.editor.config.get( 'ckfinder.openerMethod' ) || 'modal';
 
-		if ( method != 'popup' && method != 'modal' ) {
+		if ( openerMethod != 'popup' && openerMethod != 'modal' ) {
 			throw new CKEditorError( 'ckfinder-unknown-openerMethod: The openerMethod config option must by "popup" or "modal".' );
 		}
 
@@ -50,7 +50,6 @@ export default class CKFinderCommand extends Command {
 		config.onInit = finder => {
 			finder.on( 'files:choose', evt => {
 				for ( const file of evt.data.files.toArray() ) {
-
 					// Use CKFinder file isImage() to insert only image-type files.
 					if ( file.isImage() ) {
 						const url = file.get( 'url' );
@@ -78,7 +77,7 @@ export default class CKFinderCommand extends Command {
 			} );
 		};
 
-		window.CKFinder[ method ]( config );
+		window.CKFinder[ openerMethod ]( config );
 	}
 }
 

+ 1 - 1
packages/ckeditor5-ckfinder/tests/manual/ckfinder.html

@@ -1,5 +1,5 @@
 <!--<script src="https://cksource.com/weuy2g4ryt278ywiue/ckfinder.js"></script>-->
- <script src="/build/ckfinder.js"></script>
+<script src="/build/ckfinder.js"></script>
 
 <div id="editor">
 	<h2>CKFinder sample</h2>

+ 0 - 3
packages/ckeditor5-ckfinder/tests/manual/ckfinder.js

@@ -19,9 +19,6 @@ ClassicEditor
 		toolbar: [ 'heading', '|', 'undo', 'redo', 'ckfinder' ],
 		image: {
 			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
-		},
-		ckfinder: {
-			openerMethod: 'popup'
 		}
 	} )
 	.then( editor => {