Home >> ASP.NET >> RichTextBox in a single textbox among multiple TinyMCE

RichTextBox in a single textbox among multiple TinyMCE

Some time ago, I have written an post about integration of TinyMCE editor in ASP.NET website. The same was also published in CodeProject and most visited article of mine. While answering comments there, I got a request from one of reader.
His question is, “I have used TinyMCE Rich TextBox in my application but in my web form i have mulitple mulitiline TextBox. what I want that Rich TextBox should be bind to only one text box not all TextBoxes.


So the solution is here. Lets create a scene as below.



Here we have to convert TextArea for about to Rich Text Editor (WYSIWYG). Lets view source code of above design. I have tried to use simple HTML5 tags. So that other users can also get advantage of this tutorial.

Here we are using TinyMCE version 4.0.xx. This version is major upgrade and has completely different look and internal architecture compared to version 3.xx. So here is some difference in its integration. If you are not familiar with this process, please read our previous post, that will describe you about Copying required files in project directory and inserting script in more details. Insert below code before closing of head tag in your HTML page.


Notable and new code in above integration script is selector tag. This is new included tag in TinyMCE version 4.0.xx. This gives us below options.
Do not forget to change the path to Script as per you folder structure.

  • selector : “textarea”

    : This option will convert all TextAreas in visual editor. 

  • selector : “textarea.Editor”

    : This option will select all TextAreas with CSS Class Editor applied.

  • selector : h1.Editor

    or div.Editor : This option will change this to Inline editor for H1 or DIV with CSS class name of Editor.

As you see in code of scene designed above. you can see that we have applied class Editor which we did not created in any css file to one of the TextArea. Here we used this method.

Older Version

If you are working with TinyMCE version 3.xx, here is the code to be inserted in Head section of HTML page. 


Now, the output of above work is below.

Its perfect.
If you find this article helpful, drop a comment or share with your friend.
+John Bhatt

About John Bhatt

Aka, Prithvi Raj Bhatt, A Proud Nepali, Blogger, Software Developer, ASP.NET, Web Designer & Developer, Faculty and a Troubleshooter blog @PRsBlog

Check Also


Solution for Dell Laptops without Right Click (context menu) button on Keyboard

I have been using Acer laptops since last 5-6 years and never purchased Dell for …


  1. it’s working for local but dont work on the server

  2. now ı do. thank you so much

  3. Good to know. Thanks for reading.

Leave a Reply

Your email address will not be published. Required fields are marked *