Free Markup TextArea HTML Editor in Javascript

A dead simple, fast loading, light weight and easy to use html markup editor for your projects. It is the ultimate textarea replacement. It does not use iframes instead it just replaces textarea into an editor where you can insert basic html markup codes like bold, italic, hyperlink, image, blockquote and more..

Much of the inspiration of this editor came from the editor used in wordpress forums. I really loved the simplicity of the editor used there. The reason i kept as textarea editor instead of using iframes (which gives rich html) is because iframe based editors are subjected too many injection attacks.


– Inserts HTML codes in textarea
– No iFrames
– Fast loading and lightweight (code just under 2kb)
– Works on all major browsers
– No popup html window for inserting hyperlinks.
– Easy to integrate
– Inserts quick html code
– Inserts ordered and unordered lists (new feature)



Download (5kb)

This editor is 100% FREE and feel free to use this editor in your projects or do whatever you want. Please spread word by any means possible.

Note:This editor inserts html code. If you want a same editor, capable of inserting bbcode, you can download free bbcode editor

Free Icons

If you want to customize the editor with new icons you can download silk icons set. It is free!

How to Install

1. Just extract the folder and upload editor folder to your server. All the editor code and images are inside that folder. You should not run any php scripts inside this folder. Any html or php script calling this editor must above and outside this folder

2. Create a PHP script or html page (ex: example.php ) and initialize the editor with the below code.

Starting the Editor

To initialize the editor, you have insert the following lines

1. Place this code inside the of the html page inside head tag.

<script type="text/javascript" src="editor/ed.js"></script>

2. Place this 2 lines of code within the form or wherever you want the textarea editor to appear. The name and id of textarea could be anything, just make sure that both are same.

<script>edToolbar('mytxtarea'); </script>
<textarea name="mytxtarea" id="mytxtarea" class="ed"></textarea>


Note: Make sure that the id value and the value inside of edToolbar () is same.

If you want multiple instances of editors, on same page

<form name="form1" method="post" action="">
    <script>edToolbar('mytxtarea'); </script>
    <textarea name="mytxtarea" id="mytxtarea" class="ed">This is a sample text</textarea>
    <script>edToolbar('mytxtarea2'); </script>
    <textarea name="mytxtarea2" id="mytxtarea2" class="ed">This is a sample text</textarea>
    <script>edToolbar('mytxtarea3'); </script>
    <textarea name="mytxtarea3" id="mytxtarea3" class="ed">This is a sample text</textarea>

    <input type="submit" name="Submit" value="Submit">

The default height and width of text area is specified in styles.css. It is 400px width and 150 height. You can open styles.css and modify the width and height of text area.

Frequently Asked Questions

1. How do i customize the editor with stylesheet?

It is easy to customize the images and editor with stylesheet. Just change stylesheet code in styles.css

2. Images does not appear or does not load.

There could be a problem in the path of images the editor relative to your PHP script. Just place the bbeditor folder below / assuming that php script is in /example.php and the editor is /bbeditor/images

if you want to manually change the path of images, open ed.js and you will need to change lines like this indicating the correct path of images.

document.write("<img class=\"button\" src=\"editor/images/bold.gif\" name=\"btnBold\" onClick=\"doAddTags('<strong>','</strong>')\">");

3. How do i load the data stored in database to the editor for editing?

This is a very important question. Suppose you have inserted the content with bbcodes to the database but what if you want to make changes to the content. You might want to pull the content from database and load it in editor to make editing and changes to it. In that case you will need to output the javascript initialization with php. In this way you will load the content when the editor starts.

<form name="form1" method="post" action="">
<script>edToolbar('mytxtarea'); </script>
<textarea name="mytxtarea" id="mytxtarea" class="ed">//PHP CODE HERE//</textarea>
    <input type="submit" name="Submit" value="Submit">

4.  How do i add this editor to wordress comments form?

Glad you asked! It can be done easily. see this page

5. Where can i find more icon sets to use with this editor?

Note that because of copyright issues, i havent used the icon sets created by others in this editor. That is why i created my own editor icons (may not the best but good to go). I have seen many many open source icons and you can find them this page.

7. Is there any license to remove copyright on this script?

yes, you can remove the copyright in this script to use this editor in your projects. There is a one time $30 fee copyright removal fee. You can use this payment link. This small money will help me to buy a movie ticket.

This grants you unlimited license including removing copyright and use this script in your commercial projects. I do not provide support  with this script.

Disclaimer: use of this script is at your own risk.

You can also discuss about this script in my forum. Although i cannot provide support because of my busy schedule, i would be happy to discuss in the forum.

Enjoy the editor!

Our 650-621 practice questions are more then simple 70-236 test prepared to help you assess your real knowledge for 70-270 exam.

Similar Posts:


Balakrishnan Prabhu

Mr. Balakrishnan Prabhu is the founder of Corpocrat magazine. He is also the founder of Best Citizenships (BC), assisting wealthy individuals with with global citizenship and residency programs in Europe. His other interests are Linux, Machine learning, Wordpress, etc. You can contact him here

  • neged

    You’re my hero!!

    Where’s the donate button lol?

    • Alejandro

      I say the same!!! You are the best, doesnt matter if is simple, but its functional!!!

      Thanks a lot!!!

  • This is a great and dead easy editor to add to my site. I am having trouble adding “smiles”. It’s a two-step process where the user would click a single button to cause a pop-up window, and then clicking on that pop-up will cause text to be inserted in the textarea.

    Any thoughts on how to add this functionality?

    Thank you.

  • Brad

    Scott – All you have to do is code a jump/drop menu with the images you want instead of the popup window to display your options. Then, use the same processing form for posting the code to your textarea.

    That will make your editor a little more streamlined and keep it in one window.

  • i am not able to add youtube video out of the box…how do i modify the code to support it?

  • Work also on WordPress?

    • pbu

      All that is needed is a wordpress plugin to replace the existing tinymce editor. I will soon find some time or other to write the plugin. Thanks again!

  • I was a little improved list tags and changed installation


    <body onload = "edToolbar('textareaId')">


    <script type="text/javascript">edToolbar('textareaId')</script>

    before close tag </body>

    Multiple instances of editors, on same page: edToolbar(‘all’)

    and place css link in the head
    <link rel='stylesheet' href='ed.css' type='text/css' />


  • ehgraphix

    can you add color picker and font size

  • Annie17

    I use an editor online, very funcional and free.
    Try , its free and simple to work on it.

  • nice code

  • Hi! Would you mind if I share your blog with my myspace group? There’s a lot of people that I think would really enjoy your content. Please let me know. Many thanks

  • Neetu

    Can this editor be used with dynamically loaded textareas . with Jquery I am creating textareas but the WYSIWYG editor is not attaching events on these textareas . Any clue ?

  • Very easy to use html editor much better to use than dreamweaver, thanks

  • lodp

    Very nice — but as someone pointed out, calling it WYSIWYG is a bit misleading. Actually it’s WYSIH – what you see is HTML 🙂

  • Thanks for this HTML Editor, I think it will come in very handy for one of the CMS project I’m working on.

  • notnoobie

    Simple and great!
    I found this page in 2010 and the code showed me the way i needed. Now I use a derivated code for my projects.
    Thanks a lot!

  • mrsa

    Hi, I want to use your script in my websitemakerscript, in development, an the last I’m planning to sell through the internet. What about the copyright of your script and such? Is it sufficient when I don’t remove your copyright-lines and nothing more?

    Hope to hear from you!
    Best regards

    • pbu

      yes, it is sufficient if you dont remove copyright line. if you want remove, there is a small fee. contact me.

      • mrsa

        Thankyou! Could you please send me the details in order to remove the copyright-stuff? I could pay through paypal. My emailaddress you can find in my guestbookentry.

  • fearless924

    Can this editor be add to a text area in the WP plugin Contact Form 7?

  • WOW…Wonderful…I was just looking for it.. Thanks a lot

  • I am using it and it is working so nice… I was looking for its update…. like insertin subscripit….

  • Great script works in firefox but I’m having trouble in I.E. any suggestions