c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
JQuery

How to set value to nicedit textarea using jQuery?

| | JavaScript , JQuery
In this example I will show you how to update the value nicedit textarea using jQuery. While clicking the button I will get the HTML output that I need to set to nicedit textarea using jQuery.

Jquery apply nicedit text html:

 <script type="text/javascript" src="//js.nicedit.com/nicEdit-latest.js"></script>
<script type="text/javascript">
 
    $(document).ready(function () {
             //<![CDATA[
        bkLib.onDomLoaded(function () {
            new nicEditor({ fullPanel: true }).panelInstance('moredetails');
            new nicEditor({ fullPanel: true }).panelInstance('txtPageCode');
        });
        //]]>
        });
 
 
  $("#btnFillGSM").click(function (e) {
            var dataObject = { url: $("#Url").val() };
            $.ajax({
                url: '/Specifications/Fill_DATA',
                data:
JSON.stringify(dataObject),
                type: "POST",
                contentType: 'application/json; charset=utf-8',
                dataType: 'json',
                success: function (data) {
                    var htmlString = data.code;
 
                    //$("#moredetails").html(htmlString);
                   
                      nicEditors.findEditor("moredetails").setContent(htmlString);
                    return false;
                },
                beforeSend: function () {
                    $("#divprogress").show("fade", 500);
                },
                complete: function () {
                    $("#divprogress").hide("fade", 500);
                },
                error: function (err) {
                    alert(err.statusText);
                }
            });
        });
</script>