Sebuahhobi98

summernote

Sep 11th, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <form class="form-horizontal" id="submit" name="form_daftar" enctype="multipart/form-data">
  2. <textarea id="isi_post" name="isi_post" class="summernote"> </textarea>
  3. <button type="submit" class="btn btn-primary" id="tambah_data">Simpan Data</button>
  4. </form>
  5.  
  6. $('#isi_post').summernote({
  7. height: 350,
  8. placeholder: 'CCTV Allah selalu mengawasi... Stop Maksiat!',
  9. maxHeight: 350,
  10. focus: true,
  11. });
  12. $('#submit').submit(function(e){
  13. e.preventDefault();
  14.  
  15. $.ajax({
  16. url:'<?=base_url();?>admin/post/'+action,
  17. type:"post",
  18. data:new FormData(this),
  19. processData:false,
  20. contentType:false,
  21. cache:false,
  22. async:false,
  23. success: function(data){
  24.  
  25. }
  26. });
  27. });
Add Comment
Please, Sign In to add comment