ckeditor/ckeditor4-presets

Missing plugins between github and ckeditor.com's ckbuilder

devdave opened this issue · 2 comments

Likely not the appropriate spot, was looking to clone and build ckeditor on my own because the website version is partially broken for custom builds. Does this version in github provide a custom build mechanism or would I just need to copy one of the presets and configure it for myself?

Yes this is a repository that contains building infrastructure. So you can add your custom plugins, modify preset mapping to match your needs and then build CKE.

I'm curious to know what was the problem with making custom builds with our online builder?

Thanks, I will definitely be checking this out as I'd like to learn how to make my own extensions and builds so I deeply appreciate this being on github.

As for my problems, I figured it out and this was probably one of the worst caching surprises I've dealt with in a while.

Problem #1 Development server I am using is putting "Expires" on everything it sends from /static/ and I was not aware of that.

Chrome, Edge, and Firefox will almost always request ckeditor/config.js?t={timestamp} from the server because of it's size (~2KB) but not the other dynamically added assets (eg. en.js) as they are much larger.

Once the browsers cache the larger files, they won't make any other request to the server until the expires tag's date/time is reached (12 hours) or in some cases the browser may randomly check the etag to see if the cached copy is still fresh.

Problem #2 I put a small build of CKEditor into /static/ckeditor, was deeply impressed, downloaded a larger/more complex build and put it into the same location. Since the cache busting variable CKEditor.scriptLoader uses var timestamp = '%TIMESTAMP%' and that is the same value regardless of build type (custom or one of the presets), the cached copies of everything but ckeditor.js and config.js were not refreshed which broke CK locally (eg. missing lang entries or plugins).

Really confusing part is that only CKEditor's dynamically loaded assets are being cached by the three browsers and inconsistently at that. I've gone through CKEditor.scriptLoader to try and replicate its behavior without much if any luck so far; sometimes the browser's will or will not do a quick etag check. I switched off all caching on my browser and stopped the development server from sending anymore caching headers so that problem is embarrassingly solved.