Opened 9 years ago
Last modified 9 years ago
#13487 confirmed New Feature
Make CKBuilder Better Support CDN Loading
Reported by: | Steve James | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Project : CKBuilder | Version: | 4.0 |
Keywords: | Cc: |
Description
First: Thank you for all your efforts! You guys are extraordinary.
I would like to suggest that CKBuilder be extended to better support those of us who would prefer to load CKEditor from a CDN, but use a lot of extra plug-ins.
I have read your doc on loading from a CDN: http://cdn.ckeditor.com/
I already load jQuery, jQuery UI, and Amplify from CDNs, so it is nothing new to me.
However, I do not want to load CKEditor from a CDN, as of yet.
Here is why: I load a lot of extra plugins that my users like, many of which are not in your available builds from the CDN. Unless I am mistaken, I would end up with a lot of extra HTTP calls to load those plug-ins from our server that would probably offset the benefit from CDN loading.
Although, your CDN doc is helpful, it begs the question to me of why you do not just extend CKBuilder to be able to create a "mega plug-in" (a bunch of concatenated plug-ins w/ setup code, but w/o the core ckeditor) for extra plug-ins that are not part of the standard builds, such as for the CDN builds. That way, I could just load one of the available builds from the CDN, and I could use CKBuilder to put all the extra plug-ins in one "mega plug-in" to be loaded from our server. It keeps the number of HTTP calls low, and enables me to more easily set up a CDN fall-back for my users in China for whom CDNs are sometimes blocked.
And, yes, I could probably set something up to concatenate the various extra plug-ins myself. However, isn't that what CKBuilder basically does, anyway?
Change History (7)
comment:1 Changed 9 years ago by
Keywords: | CKBuilder CDN Extra Plugins removed |
---|---|
Status: | new → confirmed |
Version: | 4.5.1 (GitHub - master) → 4.0 |
comment:2 Changed 9 years ago by
There should be no problem with concatenating plugin.js files - I think that CKEditor would load them with CKEDITOR.plugins.addExternal's help without any problem. However, what I think could be really tricky are icons and lang files. I don't think there'll be a way to concatenate these, but hopefully I'm mistaken :D
comment:3 Changed 9 years ago by
Yep, that was my concern. Language files and icons may not be that easy to handle, addExternal is too simple for this.
comment:4 Changed 9 years ago by
My view is this functionality does not need to be perfect. My view is that the goal should be to get resulting file count as close as possible for a CDN loading scenario to what you could achieve via CKBuilder for the analogous build there. Because of the need to keep a standard set of builds on the CDN, the CDN loading scenario will likely always involve more files if there are a lot of extra plug-ins, but perhaps the number can be minimized.
For example, lets use an example of the full build plus 6 extra plug-ins for the sake of discussion...
For the non-CDN load approach, we can just use CKBuilder to bundle a lot of the javascript into ckeditor.js. However, if I understand you correctly, even in that scenario, some things still cannot be concatenated into ckeditor.js. (Perhaps a different file? Maybe create a concatenated language.js file or similar that can be handled differently.)
For the CDN load approach, we would load the full build from the CDN, but we would have the 6 extra plug-ins to deal with. Maybe CKBuilder could create a concatenated "mega plug-in" of those 6 plug-ins... at least the js that can be concatenated. I do not think it is a terrible thing if there are still some leftovers, as not everything gets concatenated with the non-CDN/CKBuilder approach, anyway. (although I certainly would prefer fewer files to deal with)
This could be incorporated with improvements to the CKBuilder UI that I see others have requested. (A topic for a different ticket.)
comment:5 Changed 9 years ago by
As far as CKBuilder UI to support this, I think you could just add a checkbox to CKBuilder similar to this...
[X] - Bundle extra plug-ins separately from those in selected Pre-Set. (Useful when loading pre-set from a CDN.)
comment:6 Changed 9 years ago by
The scenario is pretty clear, no need to explain further ;) It's just that the number of required modifications to CKEditor and builders (online and command line) is yet unknown. I'll be diving into builders due to other ticket, so will check this case as well.
comment:7 Changed 9 years ago by
BTW. I mentioned this scenario in https://github.com/ckeditor/ckeditor5-design/issues/67
That's an interesting idea that makes sense. No ETA or milestone yet, needs investigation on how complicated it would be.