In our deployment of FCKeditor, we have a bunch of commands which we necessarily need to disable or remove access to.
I can see that there are a bunch of files that related to particular commands. My question is, is there a mapping of commands to files that I could use to remove all the unnecessary files?
Thanks in advance.
I can see that there are a bunch of files that related to particular commands. My question is, is there a mapping of commands to files that I could use to remove all the unnecessary files?
Thanks in advance.
Re: Remove unused commands and scripts
I'm not sure what you are intended to say with "commands", but check out the Deployment page in the documentation. I hope that helps.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Remove unused commands and scripts
Italic, Underline, Link, Image, Save, Templates, any of the form commands, block quote, smileys, style combo, font combo, size combo, text colour, and a few others - we removed access from the toolbar/context menu (and keyboard shortcut where relevant).
We are upgrading from 1.6 to 2.6.1, and the footprint has grown from around 150k to around 350k. I have already followed the guidance in the deployment page, but this is more about reducing the actual size of what the editor loads on the client rather than the footprint on the file system.
Does this make more sense?
Regards,
Nitesh
Re: Remove unused commands and scripts
The uncompressed FCKeditor code is a 250KB file. It gets reduced to 65KB if you properly setup compression in your web server, which I would definitely recommend. The impact is not that huge, for a full featured editor.
The current version does not provide much granularity to remove parts of the code. We'll have much betters results with V3 instead.
Meanwhile, you may try to reduce the code code, by removing stuff that is not used by you. I haven't ever done that, but you could give it a try and see the results.
You may edit the fckpackager.xml file, commenting out some file references. For example, these files are used for toolbar combos:
You may also check which of the following commands are not used by you:
Them, you will need to "recompile" the compressed code. Check out the documentation for more information about it:
http://docs.fckeditor.net/FCKeditor_2.x ... ed_scripts
It will be a try/catch thing, but it could give you some results.
I'm quite curious. Please let us know if you have any real benefit with it, and the numbers of it.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Remove unused commands and scripts
I was able to remove the following files:
<File path="editor/_source/classes/fcktoolbarfontscombo.js" />
<File path="editor/_source/classes/fcktoolbarfontsizecombo.js" />
<File path="editor/_source/commandclasses/fckshowblocks.js" />
<File path="editor/_source/commandclasses/fckspellcheckcommand_ie.js" />
<File path="editor/_source/commandclasses/fcktextcolorcommand.js" />
<File path="editor/_source/commandclasses/fckpastewordcommand.js" />
<File path="editor/_source/commandclasses/fckfitwindow.js" />
This only gave me a saving of about 15k on the original 250k compressed file, so I'm not going to bother with it. Our old version is 1.6, so I guess things have moved on a fair bit since then. I don't have any idea as to what footprint other editors out there have, so I can't really compare, but I'll be sticking with this editor.
Thanks for your response,
Nitesh