mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 12:49:55 +09:00
fix for xpresseditor
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6057 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
387d11291b
commit
6135ae2c6d
4 changed files with 52 additions and 43 deletions
|
|
@ -46,8 +46,8 @@
|
|||
if(!$editor_config->comment_editor_height) $editor_config->comment_editor_height = 120;
|
||||
if($editor_config->enable_autosave!='N') $editor_config->enable_autosave = "Y";
|
||||
|
||||
if(!$editor_config->editor_skin) $editor_config->editor_skin = 'default';
|
||||
if(!$editor_config->comment_editor_skin) $editor_config->comment_editor_skin = 'default';
|
||||
if(!$editor_config->editor_skin) $editor_config->editor_skin = 'xpresseditor';
|
||||
if(!$editor_config->comment_editor_skin) $editor_config->comment_editor_skin = 'xpresseditor';
|
||||
|
||||
return $editor_config;
|
||||
}
|
||||
|
|
@ -87,10 +87,10 @@
|
|||
|
||||
// 스킨 설정
|
||||
$skin = $option->skin;
|
||||
if(!$skin) $skin = 'default';
|
||||
if(!$skin) $skin = 'xpresseditor';
|
||||
|
||||
// xpresseditor룰 위한 셋팅
|
||||
//if($skin=='default') $skin = 'xpresseditor';
|
||||
// if($skin=='default') $skin = 'xpresseditor';
|
||||
|
||||
$colorset = $option->colorset;
|
||||
Context::set('colorset', $colorset);
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@
|
|||
</ul>
|
||||
<ul class="extra1">
|
||||
<li class="blockquote xpress_xeditor_ui_quote">
|
||||
<button type="button" title="인용"><span>{$lang->edit->blockquote}</span></button>
|
||||
<button type="button" title="{$lang->edit->blockquote}"><span>{$lang->edit->blockquote}</span></button>
|
||||
<!-- 인용 레이어 -->
|
||||
<div class="layer xpress_xeditor_blockquote_layer" style="display:none">
|
||||
<ul>
|
||||
|
|
@ -490,6 +490,5 @@
|
|||
<script type="text/javascript">//<![CDATA[
|
||||
var editor_path = "{$editor_path}";
|
||||
var auto_saved_msg = "{$lang->msg_auto_saved}";
|
||||
|
||||
var oEditor = editorStart_xe("{$editor_sequence}", "{$editor_primary_key_name}", "{$editor_content_key_name}", "{$editor_height}");
|
||||
//]]></script>
|
||||
|
|
@ -8,18 +8,33 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
|
|||
var iframe = jQuery('<iframe id="editor_iframe_'+editor_sequence+'"frameborder="0" src="'+editor_path+'/blank.html" scrolling="yes" style="width:100%;height:'+editor_height+'px">');
|
||||
var htmlsrc = jQuery('<textarea rows="10" cols="20" class="input_syntax" style="display:none"></textarea>');
|
||||
var form = textarea.get(0).form;
|
||||
|
||||
form.setAttribute('editor_sequence', editor_sequence);
|
||||
|
||||
jQuery("#xpress-editor-"+editor_sequence).val(jQuery("#fo_write input[name=content]").val());
|
||||
var saved_content = '';
|
||||
if(jQuery("#fo_write input[name=content]").size()>0){
|
||||
saved_content=jQuery("#fo_write input[name=content]").val().replace(/src=\"files\/attach/g,'src="'+request_uri+'files/attach');
|
||||
jQuery("#xpress-editor-"+editor_sequence).val(saved_content);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// remove procFilter
|
||||
form.onsubmit=function(){
|
||||
var content = editorGetContent(editor_sequence);
|
||||
editorRelKeys[editor_sequence]['content'].value = content;
|
||||
insert(form);
|
||||
return false;
|
||||
};
|
||||
if(form.comment_srl){
|
||||
form.onsubmit=function(){
|
||||
var content = editorGetContent(editor_sequence);
|
||||
editorRelKeys[editor_sequence]['content'].value = content;
|
||||
insert_comment(form);
|
||||
return false;
|
||||
};
|
||||
}else{
|
||||
form.onsubmit=function(){
|
||||
var content = editorGetContent(editor_sequence);
|
||||
editorRelKeys[editor_sequence]['content'].value = content;
|
||||
insert(form);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
||||
// hide textarea
|
||||
textarea.hide().css('width', '99%').before(iframe).after(htmlsrc);
|
||||
|
|
@ -85,10 +100,10 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
|
|||
if (!jQuery.browser.msie && !jQuery.browser.opera) {
|
||||
oEditor.registerPlugin(new xe.XE_WYSIWYGEnterKey(oWYSIWYGIFrame));
|
||||
}
|
||||
|
||||
|
||||
// 자동 저장 사용?
|
||||
if (s=form._saved_doc_title) {
|
||||
oEditor.registerPlugin(new xe.XE_AutoSave(oIRTextarea, elAppContainer));
|
||||
oEditor.registerPlugin(new xe.XE_AutoSave(oIRTextarea, elAppContainer));
|
||||
}
|
||||
|
||||
// run
|
||||
|
|
@ -124,32 +139,28 @@ xe.XE_GET_WYSYWYG_MODE = jQuery.Class({
|
|||
},
|
||||
|
||||
$ON_CHANGE_EDITING_MODE : function(mode) {
|
||||
if(mode =='HTMLSrc'){
|
||||
editorMode[this.editor_sequence]=='html';
|
||||
}else{
|
||||
editorMode[this.editor_sequence]=='wysiwyg';
|
||||
}
|
||||
editorMode[this.editor_sequence] = (mode =='HTMLSrc') ? 'html' : 'wysiwyg';
|
||||
}
|
||||
});
|
||||
|
||||
// 미리보기 확장기능
|
||||
xe.XE_Preview = jQuery.Class({
|
||||
name : "XE_Preview",
|
||||
elPreviewButton : null,
|
||||
|
||||
$init : function(elAppContainer) {
|
||||
this._assignHTMLObjects(elAppContainer);
|
||||
},
|
||||
|
||||
_assignHTMLObjects : function(elAppContainer) {
|
||||
this.elPreviewButton = jQuery("BUTTON.xpress_xeditor_preview_button", elAppContainer);
|
||||
},
|
||||
|
||||
$ON_MSG_APP_READY : function() {
|
||||
this.oApp.registerBrowserEvent(this.elPreviewButton.get(0), "click", "EVENT_PREVIEW", []);
|
||||
},
|
||||
|
||||
$ON_EVENT_PREVIEW : function() {
|
||||
// TODO : 버튼이 눌렸을 때의 동작 정의
|
||||
}
|
||||
name : "XE_Preview",
|
||||
elPreviewButton : null,
|
||||
|
||||
$init : function(elAppContainer) {
|
||||
this._assignHTMLObjects(elAppContainer);
|
||||
},
|
||||
|
||||
_assignHTMLObjects : function(elAppContainer) {
|
||||
this.elPreviewButton = jQuery("BUTTON.xpress_xeditor_preview_button", elAppContainer);
|
||||
},
|
||||
|
||||
$ON_MSG_APP_READY : function() {
|
||||
this.oApp.registerBrowserEvent(this.elPreviewButton.get(0), "click", "EVENT_PREVIEW", []);
|
||||
},
|
||||
|
||||
$ON_EVENT_PREVIEW : function() {
|
||||
// TODO : 버튼이 눌렸을 때의 동작 정의
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -380,13 +380,13 @@ function insertUploadedFile(editorSequence) {
|
|||
obj.src = file.download_url;
|
||||
}
|
||||
temp_code = '';
|
||||
temp_code += "<img editor_component=\"image_link\" src=\""+file.download_url+"\" alt=\""+file.source_filename+"\"";
|
||||
temp_code += "<img editor_component=\"image_link\" src=\""+request_uri+file.download_url+"\" alt=\""+file.source_filename+"\"";
|
||||
if(obj.complete == true) { temp_code += " width=\""+obj.width+"\" height=\""+obj.height+"\""; }
|
||||
temp_code += " />\r\n";
|
||||
text.push(temp_code);
|
||||
// 이미지외의 경우는 multimedia_link 컴포넌트 연결
|
||||
} else {
|
||||
text.push("<img src=\"./common/tpl/images/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=\"\" />");
|
||||
text.push("<img src=\""+request_uri+"common/tpl/images/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=\"\" />");
|
||||
}
|
||||
|
||||
// binary파일의 경우 url_link 컴포넌트 연결
|
||||
|
|
@ -396,7 +396,6 @@ function insertUploadedFile(editorSequence) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
if(jQuery.isFunction(editorRelKeys[editorSequence]['pasteHTML'])){
|
||||
editorRelKeys[editorSequence]['pasteHTML'](text.join(''));
|
||||
}else{
|
||||
|
|
@ -411,4 +410,4 @@ function insertUploadedFile(editorSequence) {
|
|||
if(text.length>0) editorReplaceHTML(iframe_obj, text.join(''));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue