Skip to content

Commit

Permalink
Fix wrong property and alternative path order.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tade0 committed Aug 30, 2016
1 parent 30fe225 commit 79ff05f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions quailInclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
define( [
'window',
'callback',
'EngineQuail'
], function( window, callback, EngineQuail ) {
'EngineQuail',
'editor'
], function( window, callback, EngineQuail, editor ) {
/* @endexclude */
function quailInclude() {
var acNamespace = CKEDITOR.plugins.a11ychecker,
Expand Down Expand Up @@ -51,7 +52,7 @@ define( [
return;
}

var quailPath = 'plugins/a11ychecker/libs/quail/quail.jquery.min.js' || CKEDITOR.config.a11ychecker_quailPath;
var quailPath = editor.config.a11ychecker_quailPath || 'plugins/a11ychecker/libs/quail/quail.jquery.min.js';

This comment has been minimized.

Copy link
@f1ames

f1ames Nov 9, 2016

Contributor

I have a problem with the default path. When it is set like plugins/a11ychecker/libs/quail/quail.jquery.min.js it tries to fetch quail from path relative to current URL which may not work in some cases. If it is set like /plugins/a11ychecker/libs/quail/quail.jquery.min.js it will use absolute path (relative to domain part and not the whole url) which also may not work.

This comment has been minimized.

Copy link
@f1ames

f1ames Nov 9, 2016

Contributor

Probably something like CKEDITOR.plugins.getPath( 'a11ychecker' ) + 'libs/quail/quail.jquery.min.js' could be used.


CKEDITOR.scriptLoader.load( [ quailPath ], function( completed ) {

Expand Down

0 comments on commit 79ff05f

Please sign in to comment.