mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 22:59:57 +09:00
Fix #351 automatically remove image from editor if attachment is deleted
This commit is contained in:
parent
dce0b2f2b3
commit
65cde17d7e
1 changed files with 4 additions and 4 deletions
|
|
@ -326,13 +326,13 @@
|
|||
file_srls.push(file_srl);
|
||||
}
|
||||
|
||||
file_srls = file_srls.join(',');
|
||||
|
||||
exec_json('file.procFileDelete', {'file_srls': file_srls, 'editor_sequence': data.editorSequence}, function() {
|
||||
file_srls = file_srls.split(',');
|
||||
exec_json('file.procFileDelete', {'file_srls': file_srls.join(','), 'editor_sequence': data.editorSequence}, function() {
|
||||
$.each(file_srls, function(idx, srl){
|
||||
data.settings.fileList.find('ul').find('li[data-file-srl=' + srl + ']').remove();
|
||||
});
|
||||
var ckeditor = _getCkeInstance(data.editorSequence);
|
||||
var regexp = new RegExp('<(img) [^>]*data-file-srl="(' + file_srls.join('|') + ')"[^>]*>', 'g');
|
||||
ckeditor.setData(ckeditor.getData().replace(regexp, ''));
|
||||
self.loadFilelist($container);
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue