Hi Everyone,
I'm wondering if anyone can help me? I'm looking to try to find out if a certain feature I want to use exists in CKEditor, if there is a better way to do what I want to do or a temporary workaround until something like it is implemented after I post a feature request on trac.
Firstly, a little background. I'm integrating CKEditor into a CMS as the main editor in replacement of TinyMCE, which has had it's day unfortunately. I must say I'm very impressed at how much an improvement CKEditor is over TinyMCE, how the quality of javascript is much better, how customisation is far easier in less code and integration is extremely smooth.
I'm a happy punter so far.
I've integrated CKEditor into an open source CMS project and there is one thing I would like to try to do.
In CKEditor's config I have specified :
config.filebrowserBrowseUrl
And also :
config.filebrowserImageBrowseUrl
When a user clicks on any of the "Browse Server" Buttons, we have our own built in file manager which pops up and deals with the call back. That all works fine.
What I would like to try to do is specify the url used for the browse server button on the link tab of the image dialogue. Not the url that is used to browse the image file selection (The first tab that pops up in the image dialogue,) Instead the "Browse Server" Button on the next tab of the image dialogue that you can use to link the chosen image to a file. So that after the link is created, when you click on the image, there is a href tag which takes the browser to a file, similar to click to download and using the previously selected image in the first tab.
By setting both filebrowserBrowseUrl and filebrowserImageBrowseUrl here, I have them setup so that the filebrowser url shows all the files in our filemanger and the filebrowser Image BrowseUrl just shows images.
Both achieve this by adding a simple php variable in the url string and I can add more if need be.
The problem is, that by setting config.filebrowserImageBrowseUrl to just display images, after you have your image selected and then you move to the link tab, the config.filebrowserImageBrowseUrl is used again and only images are displayed, when obviously it makes sense that someone would want to select their image first and then use that image to create a link to any file on the server and not just images.
So is there anything like :
config.filebrowserImageLinkUrl
Or another technique I can use as a reference to find out if the link url tab's browse server button was clicked?
I'm pretty OK with javascript and it really needs to be something like an indicator that I can use to tell the file browser : Display everything and not just the images.
I looked in the api reference and I can't seem to find any reference to it.
Do you think that I am going to need to re-write the image dialogue plugin myself just to get at one api call, to solve this?
Please, if anyone has any ideas, it would be great to read them.
Many thanks,
Zanpakutō
Re: config.filebrowserImageLinkUrl?
This is bug : http://dev.fckeditor.net/ticket/4987