HTML Text Editor

HTML Text Editor 

 
In this blog, we will explain the use of HTML Text Editor in ASP.NET by using TinyMCE RichTextBox plugin.
 
Step 1
 
First of all, add a Web application and name it "Web Application".
 
Step 2
 
Now, in this application we will add a textarea, one button, and a div.
  1. <div>  
  2.     <textarea id="txtarea"></textarea>  
  3.     <input type="button" id="btnValue" value="Get Value" />  
  4.     <div id="divkarea"></div>     
Step 3
 
Now, add JQuery Link and Tinymce link.
  1. < script src = "https://code.jquery.com/jquery-3.3.1.min.js" > < /script>   <  
  2.  script type = "text/javascript"  
  3. src = "//tinymce.cachefly.net/4.0/tinymce.min.js" > < /script>     
Step 4
 
Now, add Tinymce function To make Textarea as Editor.
  1. < script type = "text/javascript" >  
  2.  tinymce.init({  
  3.   selector: 'textarea',  
  4.   width: 500  
  5.  }); <  
  6. /script>     
Step 5
 
Now, add jQuery function to Textarea content and add to div.
  1. $(document).ready(function() {  
  2.  $('#btnValue').click(function() {  
  3.   $("#divkarea").html("");  
  4.   var content = tinymce.get("txtarea").getContent();  
  5.   $("#divkarea").html(content);  
  6.  });  
  7. });   
 a