공부/Rhymix

라이믹스 ckeditor mp3, mp4 자동삽입

미친사람 2017. 9. 18. 17:45
반응형

/common/js/plugins/jquery.fileupload/js/main.js  경로에 이 파일을 수정


if(result.error == 0) {

if(/\.(jpe?g|png|gif)$/i.test(result.source_filename)) {

temp_code += '<img src="' + result.download_url + '" alt="' + result.source_filename + '" editor_component="image_link" data-file-srl="' + result.file_srl + '" />';

if (opt.autoinsertImage === 'paragraph') {

_getCkeInstance(settings.formData.editor_sequence).insertHtml("<p>" + temp_code + "</p>\n", "unfiltered_html");

} else if (opt.autoinsertImage === 'inline') {

_getCkeInstance(settings.formData.editor_sequence).insertHtml(temp_code, "unfiltered_html");

}

} else if(/\.(mp4|webm)$/i.test(result.source_filename)) {

temp_code += '<video src="' + result.download_url + '" preload="none" controls="controls" width="800" height="450">비디오</video>';

if (opt.autoinsertImage === 'paragraph') {

_getCkeInstance(settings.formData.editor_sequence).insertHtml("<p>" + temp_code + "</p>\n", "unfiltered_html");

} else if (opt.autoinsertImage === 'inline') {

_getCkeInstance(settings.formData.editor_sequence).insertHtml(temp_code, "unfiltered_html");

}

} else if(/\.(mp3|ogg|3gp)$/i.test(result.source_filename)) {

temp_code += '<audio src="' + result.download_url + '" preload="none" controls="controls">오디오</audio>';

if (opt.autoinsertImage === 'paragraph') {

_getCkeInstance(settings.formData.editor_sequence).insertHtml("<p>" + temp_code + "</p>\n", "unfiltered_html");

} else if (opt.autoinsertImage === 'inline') {

_getCkeInstance(settings.formData.editor_sequence).insertHtml(temp_code, "unfiltered_html");

}

}




main.js



반응형