CKeditor 3 with FREE coldfusion filemanager, version 2.1

coldfusion filemanager example

Update March 19, 2011: version 2.1.0 is out! See the change list underneath.

I finally found time to update the coldfusion filemanager for the CKeditor 3. Check the long list of changes underneath! Also read the original blog post for more info on this filemanager.

I released the first versions in February/March 2010, as you can read in this blog post. Since publishing it, I noticed it had some user interface issues. These issues were mostly javascript-related, and were already existent in the original code by the Core Five labs. But nevertheless, they needed to be fixed.

Download

Demo

With the risk of being completely spammed, I created a demo environment. It has some restrictions: images only, and all files are deleted within an hour.

Install

1. Download and unzip the package.

I will assume you unzipped it into your website's root folder.

2. Change the settings in file /ckeditor/filemanager/Application.cfm

Most of these settings will be good to go, but you can change whatever you like:

<cfset request.language = "en" /><!--- see directory 'lang' --->
<cfset request.maxFileSizeKB = 10000 /><!--- max. upload file size, in KiloBytes (1.000 KB = 1 MB) --->
<cfset request.onlyImageUploads = false />
<cfset request.allowedImageExtensions = "jpg,jpeg,gif,png" />
<!--- should we allow all files? If true, we do not check the extension. --->
<cfset request.allowAllFiles = false />
<cfset request.allowedExtensions = "zip,rar,psd,tif,gz,odf,odt,ods,txt,csv,pdf,doc,docx,xls,xlsx,ppt,pptx,odf,odt"
& ",#request.allowedImageExtensions#" />
<!--- If a file is uploaded with a name which already exists, should we rename it or overwrite it? --->
<cfset request.uploadCanOverwrite = true />
<!--- the web path to the root upload directory --->
<cfset request.uploadWebRoot = "/uploads/" />
<!--- the absolute path to the root upload directory --->
<cfset request.uploadRootPath = expandPath(request.uploadWebRoot) />
<!--- In case you are using an alias named "uploadRoot" in Apache/IIS, pointing to a network share, your paths would look like this:
<cfset request.uploadWebRoot = "/uploadRoot/" />
<cfset request.uploadRootPath = "\\servername\share\imageuploads\" />
--->

Note: since version 2.1, all settings have moved to this one file. In previous versions, there was also /ckeditor/filemanager/filemanager.config.cfm and /ckeditor/filemanager/connectors/cfm/Application.cfm.

3. Change the function isAllowed() in /ckeditor/filemanager/Application.cfm

By default, this function allows interaction with the filemanager from everyone. Even if you put the ckeditor directory inside your cms system or other "protected area", then the filemanager will still be available to everyone, because it has it's own Application.cfm file.
Make sure that you do something with this function, to prevent unwanted access. For example:

Check for the existence of a specific cookie

<cfif structKeyExists(cookie, "userLoggedIn")><cfreturn true /><cfelse><cfreturn false /></cfif>

Or, when you use cflogin, include the Application.cfm/cfc from your website, and then check if the user isLoggedIn()

<cfinclude template="/Application.cfm" />
<cfif isUserLoggedIn()><cfreturn true /><cfelse><cfreturn false /></cfif>

Or check on IP address

<cfif cgi.remote_addr eq "123.45.67.89"><cfreturn true /><cfelse><cfreturn false /></cfif>

4. Check if everything is working

Go to http://yourwebsite.com/ckeditor/index.html, and test it!

In case something is not working, then you'd better install firebug in Firefox, open the filemanager, and check the Console tab of Firebug to see which request throws an error. That should give you a starting point to see what's really going on.

Also, you could check the exception log file of Coldfusion / Railo / Blue Dragon.

Change list: version 2.1

  • Added support for network share storage
  • merged setting files into one Application.cfm
  • revised some internal functions (path checking etc.)
  • fixed a bug with non-displayed error output when using Quick Upload (i.e. when uploading wrong file type, no error msg was returned)
  • Error message "cannot declare local variable cfcatch twice" fixed

Change list: version 2.0

  • Path of current location now has a max length of 50 chars. Otherwise, characters in the middle of the path are replaced with “...”.
  • Header of the window now always fits (buttons sometimes fell underneath the rest of the page)
  • Right-click context menu for directories does not have “download” option anymore, and the “Select” option now behaves as a single click on the directory.
  • CfApplication has a new name, so multiple filemanagers can be used on the same website.
  • When flushing the filemanager cache, an html message is displayed (instead of returning json formatted error).
  • The filemanager now shows files and directories alphabetically in both the tree view and the grid view.
  • Directory and file names starting with a dot are not returned in the file listings anymore.
  • The filemanager now always shows the relative path (calculated from the uploadRoot) of the current directory/file as the main window's title.
  • Newly added directories and files are now correctly shown and clickable in the tree view.
  • A LOT of UI enhancements in the filemanager. For example, the tree view now always reflects the location of the grid view, and vice versa.
  • Preview images are now shown with a max width/height of 350px.
  • When renaming a file or directory, the UI now updates the new name everywhere correctly.

Change list: earlier versions

See the earlier blog post

Questions? Problems? Using it?

Let me know by adding a comment underneath!

del.icio.us Digg StumbleUpon Facebook Technorati Fav reddit Google Bookmarks
| Viewed 19053 times
  1. Robert Zehnder

    #1 by Robert Zehnder - november 17, 2010 at 22:35

    Nice, thanks for the update. :)
  2. Tim

    #2 by Tim - november 23, 2010 at 17:09

    Great job... I had some issues with the previous version display window that are now fixed. Works very nice on my cf 9 testing server.

    Unfortunately I'm having a little trouble with my shared hosting server (cf 9 on win 2003). I don't expect an intensive trouble shooting session, but can you think of any reason the filemanager window opens - displays the correct filetree of files in the left splitter window - but only get the spinning icon on the right splitter window.

    I'm sure it's a security issue somewhere and may involve the filemanager-functions.cfc, but where/how?? Any RDS requirements? Any directory requirements?

    Thanks for the great update... hope I'll be able to use it in production.
  3. Paul Klinkenberg

    #3 by Paul Klinkenberg - november 23, 2010 at 17:38

    Hi Tim, install firebug! It will show you the error in the console.
    If that doesn't help, just let me know!
  4. Tim

    #4 by Tim - november 23, 2010 at 18:28

    I did reply to your email with a screen shot of the firebug console. Not seeing any errors though. Thanks for the thought. - Tim
  5. Tim

    #5 by Tim - november 24, 2010 at 22:29

    "As you can see in the response data of the second call, the data is prefixed with "//".
    This is due to a moronic optional setting in Adobe coldfusion, "prefix json". Your hosting provider should disable that setting, because it does not make any sense anyway, but it does screw up anything ajax-like."

    Paul - your observation was spot on. Your attention to detail is impressive, or perhaps this bit you once before.

    Thought it deserved a blog post for others. Thanks again... my web host changed the setting and all is good. I'll send you a Green Bay Packer cheese head for X-mas (if you don't already have one!)
  6. Paul Klinkenberg

    #6 by Paul Klinkenberg - november 30, 2010 at 21:36

    @Tim, thanks for posting this solution here for others! And yes, I encountered the same problem once before. Another user had the same problem, which then took me 2 weeks to figure it out ;-) I then happened to see this setting in the ACF administrator while looking for something else. Anyway, great to see you got it all sorted out!
  7. Brian

    #7 by Brian - december 3, 2010 at 19:37

    I am getting the following in the thumbnail window--

    An error occured:
    The directory C:\Apache2\htdocs\uploads\C:\ColdFusion8\verity\k2\_nti40\bin;C:\php\;C:\Program Files\PHP\;C:\Perl\site\bin;C:\Perl\bin;C:\JRun4\verity\k2\_nti40\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\WINDOWS\system32\WindowsPowerShell\v1.0\ does not exist.

    Looks like the path is getting a little wacky, any help?
  8. Paul Klinkenberg

    #8 by Paul Klinkenberg - december 4, 2010 at 17:19

    Hi Brian, that's pretty sick! I have seen more strange path-related problems with Adobe Coldfusion, but this one is new to me :-/
    Could you post the results of this script (or mail to paul at ongevraagdadvies dot nl): [cfoutput]CF version=#server.ColdFusion.ProductVersion#
    GetCurrentTemplatePath()=#GetCurrentTemplatePath()#
    expandPath('/')=#expandPath('/')#
    getBaseTemplatePath()=#getBaseTemplatePath()#[/cfoutput]
    Thanks, Paul
  9. Tim

    #9 by Tim - december 4, 2010 at 17:46

    What's the simplest way to return a file to a textbox using filemanager w/o the need of ckeditor?

    Again, this is an excellent tool. Great job.
  10. Paul Klinkenberg

    #10 by Paul Klinkenberg - december 4, 2010 at 20:01

  11. Brian

    #11 by Brian - december 6, 2010 at 15:41

    @Paul Klinkenberg -

    Here are the results-This all looks right

    CF version=8,0,1,195765
    GetCurrentTemplatePath()=C:\Apache2\htdocs\ckeditor\scripttest.cfm
    expandPath('/')=C:\Apache2\htdocs\
    getBaseTemplatePath()=C:\Apache2\htdocs\ckeditor\scripttest.cfm


    It looks like for some reason, the script is somehow picking up the entire path variable for the machine, not just for the directory.
  12. Jeff

    #12 by Jeff - december 6, 2010 at 22:59

    Thanks a lot for the update. I am trying to change the file manager so the directory the user can deposit files into is based on an id number assigned to the environment from a select box. I tried populating a session variable with the value ie:"/uploads/123" and then set the variables.jqueryFileTree_webroot to the value stored in the session variable. Unfortunately, I could not get this to work. I get the spinning graphic on the right side of the screen and when I click on the tree, it just repeats the tree structure over and over. Any ideas on making the upload path dynamic based on a session variable?

    Thanks
  13. Tim

    #13 by Tim - december 7, 2010 at 2:46

    @Jeff
    What I've done for successful dynamic uploadWebRoot:

    Modify filemanager/Application.cfm - include my root Application.cfm - set variables.jqueryFileTree_webroot = session.directory

    Modify filemanager/connectors/cfm/Application.cfm - remove cfapplication tag - inlude my root Application.cfm (session vars are application specific)

    Modify filemanager/connectors/cfm/filemanager.config.cfm - set request.uploadWebRoot = session.directory

    Using Application.cfc may require an alternate solution.
  14. Jeff

    #14 by Jeff - december 7, 2010 at 18:35

    @Tim
    Thanks Tim. This helps a lot.
  15. Eddie

    #15 by Eddie - december 10, 2010 at 1:20

    I am try to configure this on my website but with little success. I'm sure I have all my paths correct but the file manager does load the images or even upload them for that matter. I am just getting the graphic indicated it is loading. What can I do?
  16. Paul Klinkenberg

    #16 by Paul Klinkenberg - december 10, 2010 at 15:43

    @Eddie and everyone else: use firefox, install firebug, and then check what the console tells you.
  17. Jeff

    #17 by Jeff - december 11, 2010 at 0:25

    I'm also getting the spinning icon, and I'm on Railo 3.1.2. Other then that it is working (i could upload files), but the spinner is kind of annoying and will make users think they need to be patient and wait.
  18. Jeff

    #18 by Jeff - december 11, 2010 at 0:59

    Problem solved re: spinner - forgot to turn off Railo debugging!
  19. Jeff

    #19 by Jeff - december 11, 2010 at 1:08

    http://i.imgur.com/wDA75.jpg

    I'm not sure if anyone else is experiencing this, but I am getting an "undefined" label instead of "URL / path to image". I figured I was missing this somewhere, but I cannot seem to find it. And that string, "URL / path to image", is no where to be found in my code base.

    Hmm...
  20. Eddie

    #20 by Eddie - december 11, 2010 at 1:54

    @Paul Klinkenberg I took ure advice and used firebug. Apparently the problem was that my hosting provider has disabled cfcontent and another so thats why its not working when I load it. Otherwise its working fine on my computer.
  21. Tim

    #21 by Tim - december 13, 2010 at 23:04

    Noticed a minor glitch: while in grid view - after uploading a new item the left splitter preview items are gone. Easy work-a-round by toggling to list view then back to grid view... just a thought for the next update.

    Not related to the filemanager, but if I place a javascr1pt alert('test') anywhere after the ckedtor.replace script - I get the following error. Testing server is fine... production not. Very weird, but perhaps someone has experienced this issue.
    Message: 'init' is null or not an object
    Line: 21
    Char: 2252
    Code: 0
    URI: http://domain/ckeditor_new/ckeditor.js
  22. Tim

    #22 by Tim - december 13, 2010 at 23:23

    Sorry for the second post... should be the right side of the splitter items are gone.

    And my javascript issue seems to be browser specific (IE8 in this case.)
  23. Paul Klinkenberg

    #23 by Paul Klinkenberg - december 13, 2010 at 23:28

    @Tim: thanks for the tip. I will look into it when I update this plugin.

    @Jeff: great to see you got things sorted out! Regarding the "undefined" label: are you using the latest version?? If you are, then check the language file at {ckeditor directory}/lang/{your language}.js. It should contain the text "path to image" somewhere.
  24. Jeroen

    #24 by Jeroen - januari 14, 2011 at 15:24

    Thnx! Might come in handy!
  25. Lee Boardman

    #25 by Lee Boardman - februari 1, 2011 at 16:14

    I am unable to see the tree menu in the file manager this so I enabled Firebug as requested. Unfortunately, I don't know how to fix the error it highlighted -

    $("#filetree").fileTree is not a function
    filemanager.js (line 715)

    Any help would be much appreciated - everything else seems to be working OK
  26. Paul Klinkenberg

    #26 by Paul Klinkenberg - februari 1, 2011 at 22:05

    Hi Lee, this error you describe is happening in your own installation, right?
    First, you could read/check all the Install steps in this blog post again. You might have skipped something.
    Also, you can check in firebug whether all (javascript and cfm) files are correctly downloaded, by looking at the "Net" tab. There, you might find a 404 or 500 error, showing you the actual problem.
    I hope you can find the issue! Cheers, Paul
  27. Tim

    #27 by Tim - februari 3, 2011 at 4:06

    Hi, Firstly, thank you for this...great tool!
    I am having an issue when I try to upload an image I get an error "Invalid File Upload".
    I know its not permissions as I still have fckeditor working and it uploads to folder fine.
    I have found where the error is sent by can't work out why....any ideas??
  28. James

    #28 by James - februari 3, 2011 at 16:38

    I'm getting this error on the preview side of the spliter:
    "The directory C:\test\uploads\c:\test\ckeditor\filemanager\connectors\cfm\filemanager.cfm\ does not exist."
    It's combining two directories some how. It should just be "C:\test\uploads\". I can upload fine, just can't see the previews or select one. Any suggestions?
  29. Jonathan

    #29 by Jonathan - februari 9, 2011 at 3:29

    @Tim I'm trying to the same dynamic directory and I can't seem to get it to work. Would be so kind as to provide some examples?
  30. Tim V

    #30 by Tim V - februari 12, 2011 at 0:14

    @Jonathan - I have identified a list of page modifications required in post #13. Below is a sample of the call to the filemanager... not sure how this will display in the post.

    <cfset session.userfilespath = web_info.web_dir>
    <cfset content = gi.body>
    <cfif isdefined("form.editor1") and len(form.editor1)><cfset content = form.editor1></cfif>
    <cfset editor_width = body_width - 10>
    <textarea id="editor1" name="editor1" >#content#</textarea>
                            <script type="text/javascript">
    //<![CDATA[

    CKEDITOR.replace( 'editor1',
                               {      toolbar : 'siteBuilder',
                                     resize_enabled : false,
                                     width : #editor_width#,
                                     //height : 400,
                                     skin : 'office2003',
                                     extraPlugins : 'autogrow,MediaEmbed',
                                     filebrowserBrowseUrl : '#web_info.web_fck_base_path#/filemanager/index.html'
                               });

    //]]>
    </script>
  31. Jonathan

    #31 by Jonathan - februari 13, 2011 at 23:48

    @Tim Thanks. I realized that I was using some code from my coldbox but had my ckeditor outside the coldbox and had to link the application sessions.
  32. Xuan Quyen

    #32 by Xuan Quyen - maart 6, 2011 at 19:06

    Running on localhost, but I do not know the folder and upload image files located. Please provide detailed guidance
  33. Fernando

    #33 by Fernando - april 1, 2011 at 13:00

    Hi Paul! I was using the 2.1 version already (sorry for the mistake), and it doesn´t work.
    I'm debugging with firebug and it doesn't show any error.

    I'm using 8500 port in CF8 and 80 port in CF9, any idea?

    Thanks again!!
  34. Paul Klinkenberg

    #34 by Paul Klinkenberg - april 1, 2011 at 13:38

    Hi Fernando, even though firebug does not show an error, you could check the Response of those ajax calls to see what is written there. Probably it says something like [error:1, message:"blabla went wrong"] Hope that helps!
    Paul
  35. joe velez

    #35 by joe velez - april 3, 2011 at 3:10

    Sick, I like this! It works great ... but for a relative image paths.

    Is there a quick and dirty way to set it up for absolute image paths such as http://doman.com/images/image.jpg ?

    I tried editing request.uploadWebRoot but that didn't work. I was able to edit request.uploadRootPath and pull my images from a different directory.

    I have a single admin for editing different sites, so it's important to be able to pull the images from any directory on the server, but then also have an absolute path to the image so they show up in the admin.

    I'll continue to mess with it ...

    Thanks

    Joe
  36. Paul Klinkenberg

    #36 by Paul Klinkenberg - april 3, 2011 at 11:37

    Hi Joe,

    I think the simplest way to do this, is change the html content when you receive it in your backend. You could do something like:
    <cfset form.myhtml = rereplace(form.myhtml, '((href|src)=[''"]?)/', "\1http://#cgi.http_host#/";, "all") />
    Which would change all image and hyperlink paths which start with a slash, to a full URL.
    Good luck, Paul
  37. Paul Klinkenberg

    #37 by Paul Klinkenberg - april 3, 2011 at 11:39

    Hmm, the weblog code changed the coldfusion code I wrote... The ";" should not be there.
  38. Fernando

    #38 by Fernando - april 12, 2011 at 17:24

    Hi Paul! Finally i solved the problem. I disabled the cf debug option and it worked!

    Now i've got a problem similar to the Joe Velez one. Iím trying to change de request.uploadRootPath in Application.cfm, but when i try to read a session variable value, i have an error. I don't know why, but in ckeditor.cfm the session is ok, but when i read it in Application.cfm i get an error saying that session doesn't exists.

    Thanks for your help!!
  39. Fernando

    #39 by Fernando - april 19, 2011 at 10:07

    It's working ok!! Thanks for your job!

    I've noticed that when you rename a folder or an image in the left tree, it doesn't refresh....


    Thanks!!
  40. Michael G

    #40 by Michael G - juni 2, 2011 at 4:42

    Curious how to update CKEditor ver3.2 to ver3.6 and still be able to use the Core Five filemanager with your set up? Or if that's even possible. (Tried the update using CK's install guide but everything broke.)

    The reason for the update is the docs on the ckeditor site are all for 3.6. Sounds like a small thing but I'm not much of a curly-bracket guy and there are some config coding difs between the two versions.

    I do pretty well with Coldfusion but I'm trying to figure out how to set some CKEDITOR.config items in-page like I've been able to do with CKEDITOR.replace. Many hairs having been pulled and still no go. I don't want to put the config items in config.js for more flexibility. Otherwise your set up was a piece of cake. Many thanks...
  41. steve

    #41 by steve - juni 21, 2011 at 0:47

    Hi after installing im getting this error
    Error: uncaught exception: [CKEDITOR.resourceManager.load] Resource name "MediaEmbed" was not found at "http://localhost/wai/ckeditor/plugins/MediaEmbed/plugin.js?t=A1QD";.

    even tried removing that plug in folder still get that error
  42. Anthony j

    #42 by Anthony j - juli 7, 2011 at 23:42

    I have tried this on 2 different hosting companies and continue to receive the same problem. When I try to upload, the browse field goes away and I am left with a horizontal scroll bar where the image/text should be. I have worked on this all aft. and cannot come up with a solution.

    Please review this link on my server and see if you can give me some sort of direction on how to fix the problem. http://www.skylarstudios.com/ckeditor/index.html

    Thanks for any help on this matter.
  43. Xuan Quyen

    #43 by Xuan Quyen - juli 8, 2011 at 4:51

    Not working. Please help me
    http://vietlong.edu.vn/ckeditor/
  44. Paul Klinkenberg

    #44 by Paul Klinkenberg - juli 8, 2011 at 20:33

    @Anthony: I tried to upload a file via the link you gave, and your server returned the following error:
    java.security.AccessControlException: access denied (java.io.FilePermission C:\Coldfusion8\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\Stationsstraat Vleuten1.jpg write)    at cffilemanager2dfunctions2ecfc1851832980$funcADDFILE.runFunction(C:\websites\8wyx7u\ckeditor\filemanager\connectors\cfm\filemanager-functions.cfc:361)    at cffilemanager2ecfm927538151.runPage(C:\websites\8wyx7u\ckeditor\filemanager\connectors\cfm\filemanager.cfm:29)

    This means that your coldfusion server is too much sandboxed, and doesn't allow file uploads :-(

    Good luck, Paul
  45. Paul Klinkenberg

    #45 by Paul Klinkenberg - juli 8, 2011 at 20:39

    @Xuan Quyen: you can see the error here: http://vietlong.edu.vn/ckeditor/filemanager/scripts/jquery_filetree/connectors/jqueryFileTree.cfm
    I have not seen this error before, but has something to do with your coldfusion server.

    I think the solution can be read here: http://www.webmasterkb.com/Uwe/Forum.aspx/coldfusion-db/4469/Incorrect-Function-Error-when-trying-to-access-network-Drive

    Or check google: http://www.google.com/search?q="Incorrect+function"+coldfusion

    Good luck, Paul
  46. Ales

    #46 by Ales - augustus 10, 2011 at 21:02

    It works in Adobe CF9 but with Railo I get this in Firebug when clicking the image button on the Editor:

    CKEDITOR.tools.getNextId is not a function
    [Break On This Error] CKEDITOR.document.getById(y).setStyle(...b.lang.image.img2Button)){C='input';
  47. Juan Escalada

    #47 by Juan Escalada - augustus 24, 2011 at 22:32

    Dear Paul:

    I´ve been pulling my hair on this side of the screen trying to make this version work on CF9... I´ve even tried to mix CKEditor3.6.1 with this version of the file manager to no avail... Anything I should be aware off???

    Thanking you in advance, Juan Escalada.
  48. Paul Klinkenberg

    #48 by Paul Klinkenberg - augustus 24, 2011 at 22:39

    Hi Juan, first thing would be to check the CF administrator setting "prefix JSON". This must be turned off (which it is by default I think).
    Otherwise, use firefox with the firebug plugin, and then check the Console tab of the plugin. I assume one or more of the cfm files then turn up red, which means a coldfusion error.
    Lastly, you could send me a link to the editor, so I can check it out. paul at railodeveloper.com.
    Good luck, Paul
  49. sachin

    #49 by sachin - september 14, 2011 at 9:34

    after hosting web application which path to set to uploadWebRoot in filemanager.config file.
  50. Paul Klinkenberg

    #50 by Paul Klinkenberg - september 14, 2011 at 10:05

    Hi Sachin,
    The example code says "the web path to the root upload directory", and then [cfset request.uploadWebRoot = "/uploads/" /].
    So if you leave it as it is, then all uploads will go into the folder "uploads" in your webroot (http://site.com/uploads/).
    If you want to change it to for example "/myuploads/paul/", then first create that directory manually, and then change the request.uploadWebroot to [cfset request.uploadWebRoot = "/myuploads/paul/" /].

    Good luck, Paul
  51. woodie

    #51 by woodie - september 14, 2011 at 16:22

    Hi Can you recommend a good hosting company that this will work on? Some of the tags used are not enabled by every one.
  52. Tim

    #52 by Tim - september 14, 2011 at 16:28

    http://www.linkonus.com/idev/idevaffiliate.php?id=308

    CF9 hosting and allowing true multiple domain hosting...

    I've been using the above web host for over 5 years, and no issues using the exceptional filemanager from Paul (for the past year or so).
  53. woodie

    #53 by woodie - september 14, 2011 at 16:33

    @Tim
    ok thanks. i'll check them out.
  54. Paul Klinkenberg

    #54 by Paul Klinkenberg - september 14, 2011 at 22:16

    Hi Woodie,
    Next to the link Tim gave you, I can very highly recommend http://www.viviotech.net/. One of the owners is my Railo colleague Jordan Michaels, which is an amazing guy, who has a LOT of technical knowledge. I am sure they can help you out.
    It does depend on your geographic location btw; if you're from Europe, you'd better go to a European hoster, for example http://www.hostmediauk.com/ or lease your own server at http://www.leaseweb.com/

    Hope that helps :-) Paul
  55. steve

    #55 by steve - december 20, 2011 at 21:55

    First, thanks for the great resource. Found this and I'm in the process of replacing out an old fck implementation I've been using for years.

    When using the file manager, running into an issue of images/files I upload are not being saved with the correct NTFS permissions. For example, after uploading a photo, the system keep prompting for a username and password and displays a red x in the display. The username/password is coming from windows.

    I logged directly onto the server and verified this by right clicking on an image, going to security and comparing the permissions from that of other working files from my old fckeditor implemention.

    I'm running CF9, IIs7.5 with plesk 10.2 (if that makes a difference).

    any ideas?
  56. steve

    #56 by steve - december 20, 2011 at 22:27

    I ended up solving this quickly.
    http://cksource.com/forums/viewtopic.php?f=6&t=10113

    The files get uploaded to a temp folder first and then all the security checks get attached to them... if they pass, they make it to the content section. #gettempdirectory()# can be used to find out the temp folder for your server.

    Since the file is moved, not copied, it retains the permissions of the temp folder. I guess a quick work around would be to copy the file instead, but I just attached the extra permissions to that folder and it seemed to work.

    I am going to guess its more of a plesk server issue, since plesk applies extra permissions to the hard drive to lock everything down.
  57. Jeff

    #57 by Jeff - februari 27, 2012 at 2:21

    Hi,

    Im a little late to this party, but I'm in a pickle so I figured its worth a shot.

    I've downloaded and extracted the CKeditor folder off of the webroot in a folder "JS". So the path to the file manager would be "/js/ckeditor/filemanager/".

    When I click the image icon, then click "browse server". I get a 404 error. The url the button resolves to is "http://www.mysite.com/filemanager/index.html";. Where it should be http://www.mysite.com/js/ckeditor/filemanager/index.html.

    Thoughts on how to correct this?

    Thanks, Jeff.
  58. Paul Klinkenberg

    #58 by Paul Klinkenberg - februari 28, 2012 at 21:43

    Hi Jeff,
    Maybe you need to change the paths in file config.js: http://www.railodeveloper.com/svn.cfm?repositorypath=ckeditor-coldfusion-filemanager/config.js%3AHEAD
    You could also search the ckeditor directory for "/filemanager", and change that path to your needs.
    Good luck, Paul
  59. Steve

    #59 by Steve - maart 15, 2012 at 17:50

    Hi Paul,

    Thanks for combining the editor and file manager - this is very helpful... I have it working properly on my site (saving/fileupload, etc), but I want to modify the html writer so that the code doesn't include any <p> or <div> tags. According to this post http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Output_Formatting
    I need to modify the setting found in CKEDITOR.htmlWriter - found in this file: plugins/htmlwriter/plugin.js.

    There is no plugins/htmlwriter/ directory from your downloaded files.

    Can you please tell me where to find this file or another way to modify how the html writer includes <p> and <div> tags.

    Thank you.

    Steve
  60. Paul Klinkenberg

    #60 by Paul Klinkenberg - maart 15, 2012 at 22:09

    Hi Steve, this editor isn't the latest version, so you're probably looking for something that's only in a newer version.
    Paul
  61. iwis

    #61 by iwis - maart 26, 2012 at 23:03

    how can i change the upload path when the program is running?
    any javascript can change the upload path?

    thanks
    Iwis Z.
  62. iwis

    #62 by iwis - maart 27, 2012 at 0:23

    Hi Paul,
    Firstly, i download all the package from your site.
    Then, i try to integrate to my java application.
    i followed the tutorial for ckeditor http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Java/Integration.
    I just add 2 line code to my jsp page
    <textarea cols="80" id="editor1" name="editor1" rows="10">
  63. Paul Klinkenberg

    #63 by Paul Klinkenberg - maart 27, 2012 at 20:06

    Hi Iwis,

    You cannot change the upload path via javascript. It would make your server/website vulnerable to hacking if that was possible.
    Hope you got it all working now, Paul
  64. chris hough

    #64 by chris hough - juni 7, 2012 at 0:33

    Thank you so much for publishing this Paul, it works perfectly for our installation.

    I was never able to get the bundled cfm connector to work.
  65. chris hough

    #65 by chris hough - juni 14, 2012 at 19:44

    [BUG]

    If you are using a CDN with a different url address than your app, is there a way to tool it so the request.uploadWebRoot can be i.e. http://cdn.com/ ?

    I have been able to hook up to the share without a problem, but now I am a little stuck
  66. Paul Klinkenberg

    #66 by Paul Klinkenberg - juni 14, 2012 at 20:28

    Hi Chris,
    The uploading in Railo is quite simple, because you can create a mapping which points to for example S3. Then, you can name your request.uploadWebRoot "/mycdn/" for example.

    But, you will still need to edit the html created by the editor.
    For example, you could do this server-side, before you save the html to your database:
    <cfset form.myhtml = rereplace(form.myhtml, '((src|href)=")/mycdn/', "$1http://cdn.com/";, "all") />

    Hope that helps, Paul
  67. chris hough

    #67 by chris hough - juni 14, 2012 at 20:32

    @Paul -

    I am hoping to keep the mappings to request.uploadWebRoot dynamic, is that possible? I am using this on a Windows Server 2008 with Adobe CFM and I would like to avoid IIS Mappings as the mappings can change in the application. We have a group of CDN locations not just one single folder.

    where would this get placed: <cfset form.myhtml = rereplace(form.myhtml, '((src|href)=")/mycdn/', "$1http://cdn.com/";;, "all") />
  68. Paul Klinkenberg

    #68 by Paul Klinkenberg - juni 14, 2012 at 20:57

    Hi Chris,
    If it is not possible to create a mapping to your cdn in Adobe Coldfusion, then you will need to rewrite some of the filemanager code to make this work.
    If you want to hire me to do it, just contact me at paul at railodeveloper com.

    Kind regards, paul
  69. chris hough

    #69 by chris hough - juni 14, 2012 at 21:48

    @Paul

    I just wanted to be sure. I can make it work, however, I would like to add this back in for others. Did you fork this code? If not I am going to fork off the original repo and create another line in GIT.
  70. Paul Klinkenberg

    #70 by Paul Klinkenberg - juni 14, 2012 at 21:55

    Hi Chris, I used a copy of the original code by Core Five labs. They are not maintaining the code whatsoever. There are one or two forks on github, one even with a pretty good CFML implementation.
    Good luck, Paul
  71. chris hough

    #71 by chris hough - juni 14, 2012 at 22:12

    @paul

    we were able to create a CDN mapping in IIS so I think I am good to go with how it is setup now.

    thank you so much for your work on this, I really appreciate it. I hope you have a great summer.
  72. Chris Hough

    #72 by Chris Hough - juni 16, 2012 at 1:44

    Has anyone found a way to hide the browser address bar in FF? Is this possible with CK?

    Cheers
  73. Matthew

    #73 by Matthew - juli 24, 2012 at 21:15

    Hey Paul, I'm looking for information on how you added the "Web Links" to the links page in CKEDITOR. I had something similar that I pulled in FCKEditor that I pulled a list from the database, but it seems much harder to implement in CKEditor, at least for me. Where do I start?
  74. Paul Klinkenberg

    #74 by Paul Klinkenberg - juli 24, 2012 at 21:44

    Hi Matthew, I must say that I just hacked it into the links plugin: http://www.railodeveloper.com/svn.cfm?repositorypath=ckeditor-coldfusion-filemanager/plugins/link/dialogs/link.js
    It is really sleazy, but it worked ;-)
    Paul
  75. Martin

    #75 by Martin - februari 11, 2013 at 11:33

    Hi,

    is it possible to just upgrade the ckeditor to a new version like 4.0, because there are issues with the ckeditor in Windows 8 IE 10, and they seem to be fixed in 4.0?

    regards
    Martin
  76. Paul Klinkenberg

    #76 by Paul Klinkenberg - februari 11, 2013 at 19:13

    Hi Martin, if life was that easy... The api's have changed in version 4 unfortunately.
    I do have a 4.0 version lying around somewhere, but haven't been able to update this project yet. I hope I will be able to soon.
    Kind regards, Paul
  77. Martin

    #77 by Martin - februari 12, 2013 at 9:34

    Hi Paul,

    thanks for the quick reply, I appreciate the work you put into this, it helped me out a lot.. I have to wait and see then.. :)

    Regards
    Martin
  78. Jose

    #78 by Jose - mei 14, 2013 at 21:37

    Hello,

    Is this image uploader utility compatible with CKEditor 4 and ColdFusion 9?

    Thanks,
    Jose
(will not be published)
Leave this field empty