mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +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.push(file_srl);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_srls = file_srls.join(',');
|
exec_json('file.procFileDelete', {'file_srls': file_srls.join(','), 'editor_sequence': data.editorSequence}, function() {
|
||||||
|
|
||||||
exec_json('file.procFileDelete', {'file_srls': file_srls, 'editor_sequence': data.editorSequence}, function() {
|
|
||||||
file_srls = file_srls.split(',');
|
|
||||||
$.each(file_srls, function(idx, srl){
|
$.each(file_srls, function(idx, srl){
|
||||||
data.settings.fileList.find('ul').find('li[data-file-srl=' + srl + ']').remove();
|
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);
|
self.loadFilelist($container);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue