How to include CKeditor which is outside of your document root

 0  vote down  star


Is it possible to use CKeditor which resides outside of your document root inside document root application?

For e.g. I am having directory structure like:

    My Documentroot


    My CKeditor is outside and parallel to document root say


How can I call ckeditor.js which is in C://xampp/lib/ckeditor/ckeditor in my application page, in C://xampp/htdocs/
Who is Participating?
If you are using windows xp you will have to use a subdomain because windows xp and earlier doesn't support folder short cuts. However in Vista and windows 7 you can create them.

ok so on one of those two machines you can do this in the command prompt (dos):

mklink /D C:\xampp\htdocs\\ckeditor  C:\xampp\lib\ckeditor

Now restart apache. As far as your web server is concerned there is a folder at C:\xampp\htdocs\\ckeditor that contains the files in the second folder but it is only a shortcut. So any changes to C:\xampp\lib\ckeditor will also change in C:\xampp\htdocs\\ckeditor.  
Shinesh PremrajanEngineering ManagerCommented:
yes you can,  however you need the lib folder to be within the htdocs folder. since htdocs is the folder which web server looks for.

so C://xampp/htdocs/lib/ckeditor/ckeditor will work for you instead of C://xampp/lib/ckeditor/ckeditor

Hope this helps
If you are just doing it for ease of use when it comes to upgrading etc then you should be able to put all the files in one location and put virtual folders in each of the web folders linking to ckeditor. As long as the user can access ckeditor via the browser it doesn't matter where it's stored or how it's accessed. I have a subdomain set up for each website I create on the same server and then point them all to the same ckeditor location.
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

teenashahAuthor Commented:
Hi shinuq,

Thanks for prompt reply.

That means it not possible to access CKeditor functionality which resides outside of my htdocs, in this case its parallel to my htdocs directory.
teenashahAuthor Commented:
Hi Daemon_Byte,

Yes your concern is right, for up-gradation and maintainability I want to keep these functionality in separate space so that many application can access it.

Can you give me detailed steps how I can achieve this "you should be able to put all the files in one location and put virtual folders in each of the web folders linking to ckeditor" ?
teenashahAuthor Commented:
Yes its working now
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.