Opened 6 years ago

Last modified 6 years ago

#10961 confirmed New Feature

Optional loading of dependent js/css files

Reported by: Craig Burke Owned by:
Priority: Normal Milestone:
Component: Project : CKBuilder Version:
Keywords: Cc:

Description

Hello,

I'm using CKEditor within a grails web project and I'm managing all js and css files using the asset pipeline plugin (this is very similar to the rails asset pipeline). As part of the build process, all Javascript files are minified and renamed based on the hash of the file. Since ckeditor is looking for files with specific names (config.js, styles.js, lang/en.js, etc.) in a specific location, this breaks the editor for me unless I exclude these files from that process.

I certainly see the utility in dynamically loading the dependent files within the plugin, but it would be nice to be able to disable this functionality for cases like mine. Having the ability to disable this behavior to give developers more control over how things are packaged would be amazing.

For example, this would allow developers the option to combine all the dependent js files they happen to be using into a single js file or whatever else is appropriate for them and their build process!

This is a great plugin and you've all done great work on it, and adding this would make my life (and probably a lot of other developers) life a lot easier.

Thanks!

Craig

Change History (3)

comment:1 Changed 6 years ago by Piotrek Koszuliński

Component: GeneralProject : CKBuilder
Status: newconfirmed

I like the idea of CKBuilder being more configurable (if that's the point? :). For example, I would love to be able to include dialogs files into the ckeditor.js, shortening the time needed for dialogs to appear.

comment:2 Changed 6 years ago by Craig Burke

I think we're talking about the same thing. Anything that would allow me to include all the dependencies I'd need up front (especially in a single js file) would be amazing!

comment:3 Changed 6 years ago by Alfonso Martínez de Lizarrondo

The only tricky part are the language files, but merging the dialogs is as easy as adding them to the js section in your builder config:

	js : [
		'../../plugins/imagemaps/dialog/imagemaps.js',
		'../../plugins/imagemaps/dialog/imgmap.js',
		'../../plugins/imagemaps/dialog/excanvas.js',
		'../../../imagemaps.extraconfig.js'
	]

and of course, there's the CKEDITOR_GETURL aimed at custom needs with regards to how to load resources http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#.getUrl

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy