Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
JavaScript
$(document).ready(function () {
   jQuery.CcEditorPlugin($("#txtHistoryMessage"), {
      style: "css/jquery.sceditor.default.min.css"
   });
});

$(document).ready(function () { 
   $('iframe').contents().find('body')[0].innerHTML = document.getElementById('txtHistoryMessage').value; 
   MatchHeights()
});



This is a jquery to create an editor which converts text area to editor. Now I want to convert all text areas in a page into editors using this function,given the no of text areas will differ. Please help me out.
Posted
Updated 15-Jun-12 4:11am
v2

1 solution

Hi,

I think this is the solution:

JavaScript
$(document).ready(function() {
    
    $("textarea").each(function(i) {
        jQuery.CcEditorPlugin($(this), {
            style: "css/jquery.sceditor.default.min.css"
        });
    });
});


BR
Martin
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900