mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +09:00
이미지 파일 업로드시 본문 자동삽입되도록 수정
This commit is contained in:
parent
b32367a464
commit
0a82801a5b
2 changed files with 13 additions and 0 deletions
|
|
@ -93,6 +93,7 @@
|
|||
},
|
||||
done: function(e, res) {
|
||||
var result = res.response().result;
|
||||
var temp_code = '';
|
||||
|
||||
if(!result) return;
|
||||
|
||||
|
|
@ -101,6 +102,12 @@
|
|||
if(!result) return;
|
||||
|
||||
if(result.error == 0) {
|
||||
if(/\.(jpe?g|png|gif)$/i.test(result.download_url)) {
|
||||
temp_code += '<img src="' + window.request_uri + result.download_url + '" alt="' + result.source_filename + '" editor_component="image_link" data-file-srl="' + result.file_srl + '" />';
|
||||
temp_code += "\r\n<p><br></p>\r\n";
|
||||
}
|
||||
|
||||
_getCkeInstance(settings.formData.editor_sequence).insertHtml(temp_code, "unfiltered_html");
|
||||
} else {
|
||||
alert(result.message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue