Codeigniter CkEditor Pre populate value in form

13.25 Muhamad Akbar Bin Widayat 0 Comments

Hi,

I have a tips for developer codeigniter to handle prepopulate.

Try this in your form add setData()
<textarea id="pr_description" class="form-control" value="<?php echo set_value('pr_description'); ?> "name="pr_description"></textarea>
<script>
  CKEDITOR.replace('pr_description');
  var editorText = CKEDITOR.instances.pr_description.setData("<?php echo set_value('pr_description'); ?>");
</script>
 I hope this article useful.

0 komentar:

terimakasih komentarnya