javascript - Why Froala Editor Don't keep format when retrieve data from database -
i have used froala editor post content website working insert data database problem when retrieved data database don't keep format before , shown html tag , text too.
issue text format don't keep after retrieved data database , past froala editor.
here configure.
$('#eng_dd,#kh_dd,#ch_dd').editable({ inlinemode: false, mediamanager: false, showinsertimage: true, imageuploadparam: 'up_img', sethtml: true, imageupload: true, imageuploadurl: 'http://localhost/cootel/gotoadmin/image/edit_img', imageerrorcallback: function (data) { if (data.errorcode == 1) { console.log('bad link') } else if (data.errorcode == 2) { console.log('bad response') } else if (data.errorcode == 3) { console.log('upload error') } } })
and here textarea
<?php echo form_textarea('eng_dd', set_value('eng_dd',$eng['dd']), 'class="form-control" id="eng_dd" placeholder="your description of slide"'); ?>
here result
when display edited html db entities encoded probably. should make sure output in textarea not encoded html entity.
Comments
Post a Comment