modal-dialog - How to clear ckeditor value when another row of data is selected?
问题描述
I have a modal form containing a ckeditor. I use this modal form to fetch data in table. when i open first row of data, ckeditor shows the content but when i open another row of data in the same table, the ckeditor does not show the content of the selected row which means it only show the first selected row.
$(document).on('click', '.show-modal-announcement', function() {
$('.modal-title').text('Announcement');
$('#sid').val($(this).data('id'));
$('#sannounce_to').val($(this).data('announce_to'));
$('#sannounce_from').val($(this).data('announce_from'));
$('#sannounce_cat').val($(this).data('announce_cat'));
$('#sannounce_subject').val($(this).data('announce_subject'));
$('#smessage').val($(this).data('message'));
$('#screated_user_id').val($(this).data('created_user_id'));
$('#screated_user_email').val($(this).data('created_user_email'));
$('#screated_at').val($(this).data('created_at'));
id = $('#sid').val();
$(function () {
CKEDITOR.replace('smessage')
$('.textarea').wysihtml5()
});
CKupdate();
$('#showModalAnnounce').modal('show');
});
解决方案
推荐阅读
- c - 为什么严格的别名规则不适用于 int* 和 unsigned*?
- javascript - Vue.js + Bootstrap-Select:如何避免渲染循环?
- javascript - 如何让这个元素移动得更慢?
- dpdk - DPDK中Reorder Library和IP分片的目的
- python - 内联评估输入函数,以便将输入或占位符附加到列表
- jquery - Boostrap 附加的表单行没有关注点击
- wordpress - QuickLatex 在没有特定错误的情况下停止在 Wordpress 中工作
- android - Inflation Exceptions when developping Cordova
- reactjs - 设计 redux 商店:什么是标准设计实践
- java - 无法在 eclipse(oxygen) ide 中创建 maven 项目引发错误