Currently I host my own copy of CKEditor, but I'd love to switch to cdn.ckeditor.com.
The major problem I'm facing is: I have multiple, private, custom plugins and I can't understand how to load the main CKEditor from CDN and my custom plugins from my server.
Is this even possible?
The documentation about
The documentation about loading local plugins should appear within a few minutes at the botom of the CDN website.
In short, CKEDITOR.plugins.addExternal should be called to register a local plugin.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
That's it, thank you very
That's it, thank you very much!
Just a tip: you'd better link Using a Custom Configuration File too from the CDN website. It becomes paramount to use config.js with a CDN-loaded editor!
In order to load custom
In order to load custom plugins I prefer to build my own copy of CKEditor with those plugins included so the user only has to download one file instead of the main ckeditor.js and then the rest of the plugins from a different host.
I would bet that loading a single ckeditor.js from your server is a much better solution than loading the main editor from the CDN and then several additional plugins from that server and others from your own.
Besides that building your own ckeditor.js allows you to patch and fix those small glitches that can't be fixed by an external plugin.
Alfonso,
Alfonso,
you're absolutely right from a performance standpoint, but what about manageability? Loading the editor from CDN guarantees a simpler upgrade path when CKSource releases a new version.
CDN is most useful for those
CDN is most useful for those who need one of official CKEditor builds. If you load additional, 3rd party plugins from your own server, when you update path to CKEditor's latest version, then you also need to check these plugins' compatibility and update them manually. So in such case using online builder is IMO faster. Especially that you can upload there you build config (kept in CKEditor main dir) and you don't even have to find again all plugins in the addons repository.
The most advanced solution and most powerful is using git repo with CKEditor and all 3rd party plugins as submodules and using command line builder in order to pack and minify all that. Something like we do here: https://github.com/ckeditor/ckeditor-presets. This option makes most sense when having many private plugins.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
@Zane - thanks again for your
@Zane - thanks again for your feedback, an updated documentation will appear shortly @ CDN website.
Regarding the discussion about pros/cons, it's simply cool to have so many different options. Loading from local server isn't fast if some of your customers are in US and your server is in Europe/Asia or vice versa. Of course, the situation changes if lots of additional plugin.js files are requested. Online builder isn't perfect for everyone as well because people sometimes have custom local plugins. So you all are right :-)
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Performance of CDN
Just to add my two cents here...
I believe you're all missing the point of what a CDN does. First off, there should be no performance loss at all, in fact there should be a marked improvment. There are two reasons for this...
1. When you load from a CDN, there is a chance that that user has encountered other websites that reference the same file at the same CDN, meaning there's a chance they don't have to download those files at all because their browser would have chached those resources.
2. CDN's aren't simply for making it easy to "upgrade" via reference, they provide geographically distributed locations for disbursement of their files. When you make a request for those files, you are directed via the domains Geo-aware DNS services to the closest geographic distribution point, and 99 times out of 100 the embarkation point of the CDN's files will be physically closer to the user than your own servers. This reduces network hops and decreases the overall latency of those files. Not to mention the CDN's servers are orders of magnitude faster than your own server generally.
The files are no different (unless of course you use the builder tool) than the ones you host yourself, and the three hosted versions are generally close to what you would use in most scenarios anyway. You still have all the flexibility via custom config loading to use custom locally hosted plugins, and skip loading or replace others entirely. CDN's are nothing but better than locally hosted files.
Cheers,
Kevin.