You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.
If an empty String is supplied as fileName the description tells:
"If provided with a empty string, will implicitly indicates that path argument is already the full path."
The implementation does test with if (!fileName) which also matches an empty string.
I ran into this problem when trying to get ckeditor-4.4.5 to work in an jsf-enabled application where the path returned by getUrl is for example: styles.js?ln=ckeditor/ckeditor-4.4.5.
AddExternal takes ckeditor-4.4.5 as the filename instead of using the already full path provided.
Changing the call in styles.js from:
CKEDITOR.stylesSet.addExternal(styleSetName, externalPath ? partsStylesSet.slice(1).join(':') : CKEDITOR.getUrl('styles.js'), '');
to
CKEDITOR.stylesSet.addExternal(styleSetName, externalPath ? partsStylesSet.slice(1).join(':') : CKEDITOR.getUrl('styles.js'), ' ');
with one space provided as the filename fixed the problem for me.
The test should be something like if(fileName ===undefined || fileName === null), but I am not a javascript developer.
The text was updated successfully, but these errors were encountered:
Hi. You're right about the issue. It turns out that it works most of the time, because this code discovers the file name:
// If "fileName" is not provided, we assume that it may be available
// in "path". Try to extract it in this case.
if ( !fileName ) {
path = path.replace( /[^\/]+$/, function( match ) {
fileName = match;
return '';
} );
}
If an empty String is supplied as fileName the description tells:
"If provided with a empty string, will implicitly indicates that path argument is already the full path."
The implementation does test with if (!fileName) which also matches an empty string.
I ran into this problem when trying to get ckeditor-4.4.5 to work in an jsf-enabled application where the path returned by getUrl is for example: styles.js?ln=ckeditor/ckeditor-4.4.5.
AddExternal takes ckeditor-4.4.5 as the filename instead of using the already full path provided.
Changing the call in styles.js from:
CKEDITOR.stylesSet.addExternal(styleSetName, externalPath ? partsStylesSet.slice(1).join(':') : CKEDITOR.getUrl('styles.js'), '');
to
CKEDITOR.stylesSet.addExternal(styleSetName, externalPath ? partsStylesSet.slice(1).join(':') : CKEDITOR.getUrl('styles.js'), ' ');
with one space provided as the filename fixed the problem for me.
The test should be something like if(fileName ===undefined || fileName === null), but I am not a javascript developer.
The text was updated successfully, but these errors were encountered: