How to use CKEditor with PHP example


I have seen many programmers asked a question about “How to use CKEditor?”. Well, here comes the very simple and effective solution. Before diving into the actual question, I would like to introduce about CKeditor. So, What is a CKeditor? The answer is, CKEditor is a ready-for-use HTML text editor designed to simplify web content creation. It’s a WYSIWYG editor that brings common word processor features directly to your web pages. So, using this editor, we can implement “What You See Is What You Get”.

As we have seen many word processor features like bold, link, fonts, codes, format, styles, special character, table, images, blah blah blah. We can find such features in CKeditor. Because CKEditor has an active community that openly develops and shares add-ons, which you are welcome to take part in. Open Source applications are totally free! They do not include adware or limited trial periods and can be used in commercial projects. More information about the CKeditor can be found in this link.

Steps to integrate CKeditor

Now, I will explain the process of using CKeditor. Don’t be scared. It’s more simple as you might have thought. To simplify the integration process, I have explained in different steps. So, I would recommend you to follow the below steps.

Step 1:

First, download the CKeditor plugin. As it is open source, it is free of cost. You can download it from its official website. Click Here to download the CKeditor Plugin. There are 3 packages of CKeditor i.e. Basic Package, Standard Package and Full Package.

Step 2:

After you have downloaded the CKeditor after selecting the package, you need to copy it to the root folder of your application. You can copy anywhere in your project, but simply copy in root folder make easy to import files.

Step 3:

As I have no index file, I will create a new index.html file in root directory of my project. This is where my CKeditor container will be placed. This is my sample of the index.html file. As I have no other codes than placing a textarea inside a form. You can create of your own.


This is the main section on how to use CKeditor. At first, you need to find ckeditor.js and sample.js file from the unzipped folder. Then you need to import in you index.html file.

After importing these 2 files, you need to create a textarea inside a form. You should note that the class of textarea should be “ckeditor” otherwise it will not work. I have given form action which is called after I clicked on submit button.

Step 4:

I have just echo my values of CKeditor in my control.php file.

Step 5:

Now, when you run the index.html file, you will see the CKeditor plugin integrated on your project. Wow!!! See, how simple it is. Now, you can add any text or image and change styles and format using CKeditor features. And, finally if you click on the submit button, it will output you what you have just inserted.
So, using these simple steps, you can integrate CKeditor with your project. Hope this helps you.

Read More Articles


  1. That is really attention-grabbing, You’re a very skilled blogger.
    I’ve joined your feed and sit up for in quest of more of your
    excellent post. Additionally, I’ve shared your website in my social networks

  2. Hey there, I think your website might be having browser
    compatibility issues. When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up!

    Other then that, terrific blog!

  3. I was more than happy to find this web site. I wanted to thank you for your time
    for this particularly fantastic read!! I definitely appreciated every
    part of it and i also have you bookmarked to check out new stuff in your website.

  4. Howdy terrific website! Does running a blog similar to this take a great deal
    of work? I have absolutely no understanding of
    coding however I was hoping to start my own blog soon. Anyway, if you have any recommendations or techniques for new blog owners please share.
    I understand this is off subject but I simply needed to ask.

  5. I blog often and I genuinely thank you for your content.
    Your article has really peaked my interest. I am going to book mark your
    blog and keep checking for new details about once a week.

    I opted in for your Feed as well.

  6. We stumbled over here from a different web address
    and thought I may as well check things out.
    I like what I see so now i’m following you.
    Look forward to going over your web page for a second time.

  7. Great post. I used to be checking continuously this blog
    and I am impressed! Very helpful info particularly the ultimate part 🙂 I deal with such information much.
    I used to be seeking this certain info for a very long time.
    Thanks and best of luck.

  8. Wonderful blog! I found it while browsing on Yahoo News.
    Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!

  9. Buut still you can not resist your eyes to see the restaurant menu card design. Hence if you
    aare the one looking for your road to success, thn there is nothing other
    than self esteem to begginning with.

  10. Long time supporter, and thought I’d drop a comment.

    Your wordpress site is very sleek – hope you don’t mind me asking
    what theme you’re using? (and don’t mind if I steal it? :

    I just launched my site –also built in wordpress like yours– but the theme slows (!) the site down quite a bit.

    In case you have a minute, you can find it by searching for “royal cbd” on Google (would appreciate any feedback) – it’s still in the works.

    Keep up the good work– and hope you all take care of yourself during
    the coronavirus scare!

  11. Schedule once with sshe or he to take it eawsy and complete tthe following exercise.
    Maay we all see acccessible to thee fullness of his glory.
    Kids do not distinguish themselves in a high-quality or bad manner.

  12. Oh my goodness! Awesome article dude! Many thanks, However I am going through issues
    with your RSS. I don’t understand why I can’t join it.
    Is there anybody else getting identical RSS issues?
    Anyone who knows the answer will you kindly respond?


  13. Hello There. I discovered your blog using msn. That is a really neatly written article.
    I’ll be sure to bookmark it and come back to
    learn extra of your helpful info. Thank you for the post.
    I will certainly return.

  14. An outstanding share! I have just forwarded this onto a colleague who was conducting
    a little homework on this. And he actually bought me breakfast simply because I discovered it for him…
    lol. So let me reword this…. Thanks for the meal!!
    But yeah, thanks for spending time to discuss this matter here on your

  15. Hello, i think that i saw you visited my website thus i came to “return the favor”.I’m attempting to find things to enhance my web site!I suppose its ok to use
    some of your ideas!!

  16. Hi there! Someone in my Facebook group shared this website with us so I came to take a
    look. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers!
    Wonderful blog and superb design.

  17. fantastic publish, very informative. I’m wondering why the opposite specialists of
    this sector do not understand this. You must continue your
    writing. I’m confident, you have a huge readers’ base

  18. Hi, I do believe this is a great web site. I stumbledupon it 😉 I’m going to revisit once again since i have book marked it.
    Money and freedom is the greatest way to change,
    may you be rich and continue to help other people.

  19. Pretty section of content. I just stumbled upon your
    weblog and in accession capital to assert that I get in fact enjoyed account your blog posts.
    Any way I’ll be subscribing to your feeds and even I achievement you
    access consistently quickly.

  20. It’s perfect time to make some plans for the long run and
    it is time to be happy. I have learn this post and if I could I desire to counsel you few attention-grabbing issues or tips.
    Maybe you can write subsequent articles relating to this article.
    I wish to read even more things about it!

  21. Howdy! I’m at work surfing around your blog from my new iphone 4!
    Just wanted to say I love reading through your blog and
    look forward to all your posts! Carry on the fantastic work!

  22. People are given many models of failure, regardless. Otherwise,
    how can you know tips on how to solve a situation? When the rope produced a cigarette pacfket and asked her to smoke.

  23. I’ve been exploring for a little for any high-quality articles or weblog posts
    in this kind of area . Exploring in Yahoo I at
    last stumbled upon this web site. Studying this info So i’m happy to exhibit that I’ve an incredibly excellent uncanny feeling I discovered just what I needed.
    I so much indubitably will make sure to do not
    forget this web site and give it a glance on a relentless basis.

  24. With havin so much written content do you ever run into any issues of plagorism or copyright violation? My
    website has a lot of unique content I’ve either authored
    myself or outsourced but it appears a lot of it is popping it up all over the
    web without my agreement. Do you know any methods to help prevent content from
    being stolen? I’d really appreciate it.

  25. This is anyone will decide to understand mayy view the markets.
    Mom is treated with a different version of behavior so she won’t
    bee unhappy, maybe. Finally, as end result of her
    persistence, he did.

  26. Excellent post. Keep writing such kind of information on your site.

    Im really impressed by your blog.
    Hi there, You’ve done a fantastic job. I will certainly digg it and in my view recommend to my friends.
    I’m confident they’ll be benefited from this web site.

  27. Great blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple adjustements would
    really make my blog stand out. Please let me know where
    you got your theme. Bless you

  28. I believe everything published made a great deal of sense.
    However, what about this? what if you typed a catchier post title?
    I mean, I don’t want to tell you how to run your blog,
    but what if you added a headline that grabbed people’s attention? I mean How to
    use CKEditor with PHP example – Kodementor is a little vanilla.
    You ought to look at Yahoo’s home page and note how they write post headlines to grab viewers to open the links.
    You might add a video or a related picture or two to get readers excited about
    everything’ve written. Just my opinion, it would make your
    posts a little bit more interesting.

  29. What’s Happening i’m new to this, I stumbled upon this I’ve found It absolutely
    useful and it has helped me out loads. I hope to give a contribution & aid other users like
    its helped me. Good job.

  30. Heya this is kinda of off topic but I was wanting to know if blogs use WYSIWYG editors or if you
    have to manually code with HTML. I’m starting a blog
    soon but have no coding knowledge so I wanted to get advice from someone with experience.
    Any help would be enormously appreciated!

  31. Hi just wanted to give you a brief heads up and let you know
    a few of the images aren’t loading properly. I’m not sure why but I think
    its a linking issue. I’ve tried it in two different internet browsers and both
    show the same outcome.

  32. Thanks for your personal marvelous posting! I truly enjoyed reading
    it, you are a great author. I will be sure to bookmark your blog and will eventually come back someday.
    I want to encourage continue your great job, have a nice evening!

  33. Its like you read my mind! You seem to know a lot about this, like you wrote the
    book in it or something. I think that you can do with some pics to drive the message home a bit,
    but instead of that, this is wonderful blog.
    An excellent read. I’ll definitely be back.

  34. Good day! This post couldn’t be written any better!
    Reading through this post reminds me of my old room mate!

    He always kept talking about this. I will forward this post
    to him. Pretty sure he will have a good read. Many thanks for sharing!

  35. you are in reality a just right webmaster. The website loading speed is amazing.
    It sort of feels that you are doing any unique trick. Moreover, The contents
    are masterpiece. you have done a great process in this matter!

  36. I am curious to find out what blog platform you are utilizing?
    I’m experiencing some minor security problems with my latest website and I’d like
    to find something more secure. Do you have any solutions?

  37. You’re so awesome! I don’t believe I have read something like this before.

    So good to discover another person with a few original thoughts on this issue.
    Really.. many thanks for starting this up. This website is something that is required on the web,
    someone with some originality!

  38. I am really enjoying the theme/design of your weblog.
    Do you ever run into any web browser compatibility problems?
    A small number of my blog audience have complained about my site not
    working correctly in Explorer but looks great in Safari.
    Do you have any advice to help fix this issue?

  39. Another winning mega888 game list ticket was
    purchased for last week’s taking from September 7, 2010.
    Thhe way you enjoyable with the megamillion lottery iss
    the answer to winning. Others she’ll have to small comees down to.

  40. I know this if off topic but I’m looking into starting my
    own blog and was curious what all is required to get set up?
    I’m assuming having a blog like yours would cost a pretty penny?

    I’m not very web savvy so I’m not 100% positive. Any suggestions or advice would be greatly appreciated.
    Many thanks

  41. Hey there, I think your website might be having browser compatibility issues. When I look at your blog site in Chrome, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, great blog!

  42. Hmm it seems like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up
    what I had written and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog writer but I’m
    still new to the whole thing. Do you have any suggestions for rookie
    blog writers? I’d certainly appreciate it.

    My web page :: netzero


Please enter your comment!
Please enter your name here