• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Summernote Text Editor With Codeigniter

I use summer note text editor with codeigniter. I am able to get summer note text it working with one text area OK. But when I create a new row by clicking on my button I would like summer note to show at the moment it only displays default bootstrap text area.

Each textarea creates its own id when click on button in <textarea id="code0"></textarea> <textarea id="code1"></textarea> <textarea id="code2"></textarea> and so on each time create new row.

Any one know best way so that I could add the script to my addContent function

Quote:<script type="text/javascript">

  $(document).ready(function() {
    $('#code_preview0').summernote({height: 300});

Quote:var content_row = 1;

function addContent() {
  html = '<div id="content-row">';
  html += '<div class="form-group">';
  html += '<label class="col-sm-2">Page Content</label>';
  html += '<div class="col-sm-10">';
  html += '<textarea class="form-control" id="code_preview' + content_row + '" name="page_code[' + content_row + '][code]" style="height: 300px;"></textarea>';
  html += '</div>';
  html += '</div>';
  html += '</div>';


Live Demo


Live Demo Full View

There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!

Messages In This Thread
[Solved] Summernote Text Editor With Codeigniter - by wolfgang1983 - 05-16-2015, 01:28 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.