Opened 10 years ago
Last modified 10 years ago
#12586 confirmed Bug
CKEDITOR.resourceManager.addExternal does not behave as described — at Version 1
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description (last modified by )
Moved from https://github.com/ckeditor/ckeditor-sdk/issues/111
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.
Change History (1)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Status: | new → confirmed |