mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Clean up unnecessary files inside CKEditor skin directory
This commit is contained in:
parent
579201fe7c
commit
4f94299414
8 changed files with 64 additions and 74 deletions
|
|
@ -12,7 +12,6 @@
|
|||
<load target="../../tpl/js/editor_common.js" />
|
||||
<load target="../../tpl/js/editor.app.js" />
|
||||
<load target="js/editor.js" />
|
||||
<load target="js/xe_interface.js" />
|
||||
|
||||
<script>
|
||||
var auto_saved_msg = "{$lang->msg_auto_saved}";
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
//Insert uploaded file to editor
|
||||
function ckInsertUploadedFile(editorSequence){
|
||||
var temp_code='';
|
||||
|
||||
var settings = uploaderSettings[editorSequence];
|
||||
var fileListAreaID = settings["fileListAreaID"];
|
||||
var fileListObj = get_by_id(fileListAreaID);
|
||||
if(!fileListObj) return;
|
||||
|
||||
if(editorMode[editorSequence]=='preview') return;
|
||||
|
||||
for(var i=0;i<fileListObj.options.length;i++) {
|
||||
if(!fileListObj.options[i].selected) continue;
|
||||
var file_srl = fileListObj.options[i].value;
|
||||
if(!file_srl) continue;
|
||||
|
||||
var file = uploadedFiles[file_srl];
|
||||
|
||||
if(file.direct_download == 'Y') {
|
||||
if(/\.(jpg|jpeg|png|gif)$/i.test(file.download_url)) {
|
||||
if(loaded_images[file_srl]) {
|
||||
var obj = loaded_images[file_srl];
|
||||
}
|
||||
else {
|
||||
var obj = new Image();
|
||||
obj.src = file.download_url;
|
||||
}
|
||||
temp_code += "<img src=\""+file.download_url+"\" alt=\""+file.source_filename+"\"";
|
||||
if(obj.complete == true) { temp_code += " width=\""+obj.width+"\" height=\""+obj.height+"\""; }
|
||||
temp_code += " />\r\n";
|
||||
} else {
|
||||
temp_code="<img src=\"common/img/blank.gif\" editor_component=\"multimedia_link\" multimedia_src=\""+file.download_url+"\" width=\"400\" height=\"320\" style=\"display:block;width:400px;height:320px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center;\" auto_start=\"false\" alt=\"\" />";
|
||||
}
|
||||
|
||||
} else {
|
||||
temp_code="<a href=\""+file.download_url+"\">"+file.source_filename+"</a>\n";
|
||||
}
|
||||
}
|
||||
cked_instance = 'ckeditor_instance_'+editorSequence;
|
||||
CKEDITOR.instances[cked_instance].insertHtml(temp_code);
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
This file is not used in Rhymix.
|
||||
|
|
@ -160,3 +160,62 @@ function ckInsertUploadedFile() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy function to get iframe content and insert it into CKEditor.
|
||||
*/
|
||||
function editorReplaceHTML(iframe_obj, content) {
|
||||
if (typeof console == "object" && typeof console.warn == "function") {
|
||||
const msg = "DEPRECATED : editorReplaceHTML() is deprecated in Rhymix.";
|
||||
if (navigator.userAgent.match(/Firefox/)) {
|
||||
console.error(msg);
|
||||
} else {
|
||||
console.warn(msg);
|
||||
}
|
||||
}
|
||||
var editor_sequence = parseInt(iframe_obj.id.replace(/^.*_/, ''), 10);
|
||||
_getCkeInstance(editor_sequence).insertHtml(content, 'unfiltered_html');
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy function to get a direct reference to the CKEditor container element.
|
||||
*/
|
||||
function editorGetIFrame(editor_sequence) {
|
||||
if (typeof console == "object" && typeof console.warn == "function") {
|
||||
const msg = "DEPRECATED : editorGetIFrame() is deprecated in Rhymix.";
|
||||
if (navigator.userAgent.match(/Firefox/)) {
|
||||
console.error(msg);
|
||||
} else {
|
||||
console.warn(msg);
|
||||
}
|
||||
}
|
||||
return $('#ckeditor_instance_' + editor_sequence).get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy function to get an instance of CKEditor.
|
||||
*/
|
||||
function _getCkeInstance(editor_sequence) {
|
||||
return $('#ckeditor_instance_' + editor_sequence).data('cke_instance');
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy function to get HTML content from CKEditor.
|
||||
*/
|
||||
function editorGetContent(editor_sequence) {
|
||||
return _getCkeInstance(editor_sequence).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy function to get text content from CKEditor.
|
||||
*/
|
||||
function editorGetContentTextarea_xe(editor_sequence) {
|
||||
return _getCkeInstance(editor_sequence).getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy function to get currently selected text from CKEditor.
|
||||
*/
|
||||
function editorGetSelectedHtml(editor_sequence) {
|
||||
return _getCkeInstance(editor_sequence).getSelection().getSelectedText();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
function _getCkeInstance(editor_sequence) {
|
||||
var $editor_area = jQuery("#ckeditor_instance_"+editor_sequence);
|
||||
return $editor_area.data('cke_instance');
|
||||
}
|
||||
|
||||
//Get content from editor
|
||||
function editorGetContentTextarea_xe(editor_sequence) {
|
||||
return _getCkeInstance(editor_sequence).getText();
|
||||
}
|
||||
|
||||
|
||||
function editorGetSelectedHtml(editor_sequence) {
|
||||
return _getCkeInstance(editor_sequence).getSelection().getSelectedText();
|
||||
}
|
||||
|
||||
function editorGetContent(editor_sequence) {
|
||||
return _getCkeInstance(editor_sequence).getData();
|
||||
}
|
||||
|
||||
//Replace html content to editor
|
||||
function editorReplaceHTML(iframe_obj, content) {
|
||||
var editor_sequence = parseInt(iframe_obj.id.replace(/^.*_/, ''), 10);
|
||||
|
||||
_getCkeInstance(editor_sequence).insertHtml(content, "unfiltered_html");
|
||||
}
|
||||
|
||||
function editorGetIFrame(editor_sequence) {
|
||||
return jQuery('#ckeditor_instance_' + editor_sequence).get(0);
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
This file is not used in Rhymix.
|
||||
|
|
@ -1 +0,0 @@
|
|||
This file is not used in Rhymix.
|
||||
Loading…
Add table
Add a link
Reference in a new issue