// The topic title was: customConfig param doesn't work with CKFinder.setupCKEditor
Hi,
i'm trying to make this work in this scenario, and it doesn't load the customization from my file:
I tried in other ways and customConfig does work if I include the command in the config.js file,
...or if I use create:
I think it should be possible to use customConfig with setupCKEditor. Isn't it?
Thank you
Hi,
i'm trying to make this work in this scenario, and it doesn't load the customization from my file:
CKEDITOR.replace('foo',{ customConfig: '/js/ckeditor-myconfig.js'}); CKFinder.setupCKEditor( null, { basePath: '/ckfinder/', customConfig: '/js/ckfinder-myconfig.js'} ) ;
I tried in other ways and customConfig does work if I include the command in the config.js file,
CKFinder.customConfig = function (config) { config.customConfig = '/js/ckfinder-myconfig.js'; };
...or if I use create:
CKFinder.create( { basePath : '/ckfinder/', customConfig : '/ckfinder-myconfig.js' } );
I think it should be possible to use customConfig with setupCKEditor. Isn't it?
Thank you
Re: customConfig param doesn't work with CKFinder.setupCKEdi
This is a bug in the documentation, thanks for reporting it, I'll add this to the todo list.
The setupCKEditor accepts an object with CKFinder configuration, however most of the settings are ignored.
Only width, height and basePath are recognized and used, because those settings are supported by CKEDITOR.config.filebrowserXYZ configuration options.
All other settings are not passed from CKEditor to CKFinder at this moment and config.js should be used to configure CKFinder instead (when CKFinder is launched from CKEditor ).
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: customConfig param doesn't work with CKFinder.setupCKEdi
I was wondering if there's any progress on getting this solved. I'm really hoping to have this option available because in my situation we're wanting to put materials (files, images, etc...) into folders based on the class course number, and some other customized configuration through the use of session variables. I need to have the ability to send the config.baseUrl a dynamically built variable so these files will be stored in the correct locations and without having to change the CKEditor/CKFinder environment (that way whenever we update the versions we'll have minimum changes we have to remember to do)
Again, it'll be nice to see this work!
Re: customConfig param doesn't work with CKFinder.setupCKEdi
So have your problem been solved? Or you still need any kind of help??
Re: [Feature request] setupCKEditor - support customConfig p
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: [Feature request] setupCKEditor - support customConfig p
You should be able to simply set the baseURL as a property in the class for ckfinder.
ie:
Once you create the ckfinder class in ASP classic for example, as my need is, you would just
do a:
ckfinder.baseurl = "/images/userid/gallery/"
and then the class would do the automatic server.mappath conversion as well.
The RTE editor cuteEditor handles the imagegallery as a property this way. It would make conversion much easier.
Why is this not implemented this way? Otherwise you are stuck with cumbersome java code or trying to have a unique config for each page or each user that activates a page.
Please make this addition!! I've tried to backtrack through the code, and even tried the wizard deal someone posted. It's full of bugs and tries to call asp.net pages from asp and looks for commands but it's case sensitive for the variable "what" instead of being case insensitive.
I can't justify purchasing ckfinder because it lacks this one feature so that I can convert over from cuteeditor easily and quickly. I can't browse for images to insert in my editor.
Also, as a side note, the thumbs and other sub directories should be optional...not mandatory.
Thanks, and please respond as to a timeline to fix this.
Peter
Re: [Feature request] setupCKEditor - support customConfig p
I think that Wiktor has already pointed out how you can do it by your own adding that info as an extra parameter to the connector and reading it in the config.(asp,php) file.
In order to provide such feature by default it has to be protected correctly in order to avoid access to non-authorized folders, we see that there's already too many people that don't understand the basic authentication for CKFinder, so that could mean much bigger problems and security is a top priority in CKFinder.
Please, remember that javascript is not java.
And you could adjust the asp code in order to pass and read back some extra parameter, taking care yourself about the security of that approach.
Nobody has reported a single issue with it in a very long time, so I wonder what are the bugs that you have found.
It's just trying to do what the configuration file tells it to.
Most of the people are quite happy using asp.net in order to perform the image manipulation, but if you don't like it, you just have to buy a license to one of the supported activeX components and adjust the config.asp file to avoid auto-detection, or disable all the image manipulation. It's up to you.
And what's the problem?
The wizard should be for you a black box. It performs some operations and the parameters could be named "sdfwemIWEF" as you aren't expected to change it.
You just need to look at the output, not how it's done.
You can disable the thumbnails in the config file, and in that same file, you can adjust what are the resource types that will be available.
Re: [Feature request] setupCKEditor - support customConfig p
As I have read the documentation, and realize that java and javascript are not synonymous. Also thanks, too, for the condicending attitude. I'm sure that will help solve the issue.
All I know is that I ran into. I spent hours trying to get this to work the way it's supposed to. The bugs I ran into were there, I had to edit the source files in the wizard that is supposed to check the setup. It was making a call to a .net page from asp version. Not sure how that's correct, that it's using .net to verify installation on asp classic. But of course, I MUST be crazy.
I realize I am using an older scripting language, but it still widely in use.
The property I am asking for is perfectly secure. You are setting the URL path in the class from within the language, thus not exposing physical directory structure. CuteEditor allows for setting the image gallery path from the page programatically from within the script after the class has been declared. Doing it from javascript or java on the page exposes the info through source on the page's html.
Once the path is set, there's no more exposure in security than any other method when ckfinder shows and does its job.
It just seems to make more sense to set the baseURL property from the class instead of having to do
these parameter replaces via java/script on the page.
I wouldn't file a ticket for a bug in the wizard as I'm sure it's seperate project.
I'd rather focus my energy on getting an easy way to set a custom baseurl on the page I am using
the editor on. Instead of system wide in one config file or kludged together.
Thanks
Re: [Feature request] setupCKEditor - support customConfig p
Any other change in the wizard is not needed and it's not the way that it's meant to be used: you have to edit the config.asp file to correct any problem that it detects.
With regards to asp.net and asp, as you should know classic asp lacks any kind of image manipulation, so the usual option is to buy a separate activeX component (they aren't cheap by the way) and install it. With some tricks we are able to provide such features by using the asp.net framework available in most of the servers without any extra costs, but if you don't like it you can disable as I said.
So going back to the main topic here, let's analyze the situation:
you have some server code, and you are generating a page that will be sent to the user. In that page you'll include a CKFinder component and you want (depending on the currently executing code) that it will use a specific server path.
So the server code stops executing, and the page is sent to the client. The CKFinder instance included in the html of that page must know somehow that you want a specific path. Remember that the page might include more than one instance of CKFinder or that the user might be working with two pages at the same time, so it certainly must include some info to know the path that you want for each one.
That means that some info must be sent in the javascript to the client!
Now what kind of info depends on how you want the integration to behave.
You can send a key that it's used at the server to get back the path, "configPath=1" and then do a request("configPath") that switches between the listed options.
You can put the server path and retrieve it in the config.asp, but in this case you must be very careful about your security as I said.
You can store the paths in an application/session level object and do something like the first option, but then you have to be careful to not increase the memory usage.
There are several options about this, and the important part is that it doesn't have to be a feature in the core CKFinder, you can easily adapt it to your needs by including the proper info in the CKFinder constructor and then reading it back in the config.asp