Opened 9 years ago

Last modified 9 years ago

#12586 confirmed Bug

CKEDITOR.resourceManager.addExternal does not behave as described

Reported by: Piotrek Koszuliński Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

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 9 years ago by Piotrek Koszuliński

Description: modified (diff)
Status: newconfirmed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy