mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
default editor 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4768 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cfe72f0d74
commit
a818600554
12 changed files with 226 additions and 45 deletions
|
|
@ -106,4 +106,11 @@
|
|||
$lang->edit->icon_align_right = 'Align Right';
|
||||
|
||||
$lang->about_dblclick_in_editor = 'You may set detail component configures by double-clicking background, text, images, or quotations';
|
||||
|
||||
|
||||
$lang->edit->rich_editor = '스타일 편집기';
|
||||
$lang->edit->html_editor = 'HTML 편집기';
|
||||
$lang->edit->extension ='확장 컴포넌트';
|
||||
$lang->edit->help = '도움말';
|
||||
$lang->edit->help_command = '단축키 안내';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -102,4 +102,11 @@
|
|||
$lang->edit->icon_align_right = 'Margen derecho';
|
||||
|
||||
$lang->about_dblclick_in_editor = 'Para la configuracion más detallada debera hacer dobleclick sobre el texto, imagen, fondo, etc.';
|
||||
|
||||
|
||||
$lang->edit->rich_editor = '스타일 편집기';
|
||||
$lang->edit->html_editor = 'HTML 편집기';
|
||||
$lang->edit->extension ='확장 컴포넌트';
|
||||
$lang->edit->help = '도움말';
|
||||
$lang->edit->help_command = '단축키 안내';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -106,4 +106,11 @@
|
|||
$lang->edit->icon_align_right = 'Placer à droite du texte';
|
||||
|
||||
$lang->about_dblclick_in_editor = 'Vous pouvez configurer en détail des composants par double-clic sur un arrière-plan, un texte, une image ou une citation';
|
||||
|
||||
|
||||
$lang->edit->rich_editor = '스타일 편집기';
|
||||
$lang->edit->html_editor = 'HTML 편집기';
|
||||
$lang->edit->extension ='확장 컴포넌트';
|
||||
$lang->edit->help = '도움말';
|
||||
$lang->edit->help_command = '단축키 안내';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -106,4 +106,11 @@
|
|||
$lang->edit->icon_align_right = '右揃え';
|
||||
|
||||
$lang->about_dblclick_in_editor = '背景、文字、イメージ、引用文の上にカーソルを合わせ、ダブルクリックすると詳細設定できるコンポーネントを表示します。';
|
||||
|
||||
|
||||
$lang->edit->rich_editor = '스타일 편집기';
|
||||
$lang->edit->html_editor = 'HTML 편집기';
|
||||
$lang->edit->extension ='확장 컴포넌트';
|
||||
$lang->edit->help = '도움말';
|
||||
$lang->edit->help_command = '단축키 안내';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -106,4 +106,14 @@
|
|||
$lang->edit->icon_align_right = '글의 우측으로';
|
||||
|
||||
$lang->about_dblclick_in_editor = '배경, 글자, 이미지, 인용문등에서 더블클릭을 하시면 상세한 컴포넌트 설정이 가능합니다';
|
||||
|
||||
|
||||
$lang->edit->rich_editor = '스타일 편집기';
|
||||
$lang->edit->html_editor = 'HTML 편집기';
|
||||
$lang->edit->extension ='확장 컴포넌트';
|
||||
$lang->edit->help = '도움말';
|
||||
$lang->edit->help_command = '단축키 안내';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -102,4 +102,11 @@
|
|||
$lang->edit->icon_align_right = 'Выровнять по правому краю';
|
||||
|
||||
$lang->about_dblclick_in_editor = 'Вы можете установить детальную конфигурацию компонента двойным щелчком по фону, тексту, рисункам или цитатам';
|
||||
|
||||
|
||||
$lang->edit->rich_editor = '스타일 편집기';
|
||||
$lang->edit->html_editor = 'HTML 편집기';
|
||||
$lang->edit->extension ='확장 컴포넌트';
|
||||
$lang->edit->help = '도움말';
|
||||
$lang->edit->help_command = '단축키 안내';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -102,4 +102,11 @@
|
|||
$lang->edit->icon_align_right = '文本右侧';
|
||||
|
||||
$lang->about_dblclick_in_editor = '双击背景, 文本, 图片, 引用即可对其相关组件进行详细设置。';
|
||||
|
||||
|
||||
$lang->edit->rich_editor = '스타일 편집기';
|
||||
$lang->edit->html_editor = 'HTML 편집기';
|
||||
$lang->edit->extension ='확장 컴포넌트';
|
||||
$lang->edit->help = '도움말';
|
||||
$lang->edit->help_command = '단축키 안내';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -105,4 +105,11 @@
|
|||
$lang->edit->icon_align_right = '靠右';
|
||||
|
||||
$lang->about_dblclick_in_editor = '雙擊背景, 文字, 圖片, 引用,即可對其相關組件進行詳細設置。';
|
||||
|
||||
|
||||
$lang->edit->rich_editor = '스타일 편집기';
|
||||
$lang->edit->html_editor = 'HTML 편집기';
|
||||
$lang->edit->extension ='확장 컴포넌트';
|
||||
$lang->edit->help = '도움말';
|
||||
$lang->edit->help_command = '단축키 안내';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@
|
|||
.toolBox .editorHelp .helpButton:hover,
|
||||
.toolBox .editorHelp .helpButton:focus{ background-position:right -21px;}
|
||||
.toolBox .editorHelp .helpButton:active{ background-position:right -42px;}
|
||||
.toolBox .editorHelp ul#helpList{ display:none; float:none !important; position:absolute; padding:5px 0; top:26px; right:0; background:#fafafa; border:1px solid #9f9f9f;}
|
||||
.toolBox .editorHelp.open ul#helpList{ display:block;}
|
||||
.toolBox .editorHelp ul#helpList li{ list-style:disc; float:none; text-align:left; white-space:nowrap; padding:0 10px 0 0; margin-left:25px;}
|
||||
.toolBox .editorHelp ul#helpList li li{ list-style:circle; margin-left:20px;}
|
||||
.toolBox .editorHelp ul.helpList{ display:none; float:none !important; position:absolute; padding:5px 0; top:26px; right:0; background:#fafafa; border:1px solid #9f9f9f;}
|
||||
.toolBox .editorHelp.open ul.helpList{ display:block;}
|
||||
.toolBox .editorHelp ul.helpList li{ list-style:disc; float:none; text-align:left; white-space:nowrap; padding:0 10px 0 0; margin-left:25px;}
|
||||
.toolBox .editorHelp ul.helpList li li{ list-style:circle; margin-left:20px;}
|
||||
|
||||
/* ToolBox Button Default */
|
||||
.toolBox .item { list-style:none; padding:0; }
|
||||
|
|
@ -193,6 +193,7 @@
|
|||
/* Editor Resize Bar */
|
||||
.xeEditor .textAreaDragIndicator{ border-top:1px solid #ddd; border-bottom:1px solid #ddd; clear:both; margin-bottom:10px;}
|
||||
.xeEditor .textAreaDragIndicator button{ width:100%; height:9px; border:none; cursor:n-resize; background:#f4f4f4 url(../images/buttonTextAreaDrag.gif) no-repeat center center; }
|
||||
.xeEditor .mask{ position:relative; width:100%;height:500px;margin-top:-500px;bottom:0; display:none; }
|
||||
|
||||
/* File Uploader */
|
||||
.xeEditor .fileUploader{ clear:both; position:relative; padding-top:5px; *zoom:1; *margin-bottom:5px;}
|
||||
|
|
|
|||
|
|
@ -13,18 +13,18 @@
|
|||
<!--@end-->
|
||||
|
||||
<ul class="editorTypeSelector">
|
||||
<li class="active"><a href="#xeEditor" onclick="return false"><span>스타일 편집기</span></a></li>
|
||||
<li class="active" id="use_rich_{$editor_sequence}"><a href="#xeEditor" onclick="editorChangeMode('', '{$editor_sequence}')"><span>{$lang->edit->rich_editor}</span></a></li>
|
||||
|
||||
<!-- HTML 모드 사용 -->
|
||||
<!--@if($html_mode)-->
|
||||
<!--@if($html_mode)-->
|
||||
<li><a href="#htmlEditor" id="use_html_{$editor_sequence}" onclick="editorChangeMode(this, '{$editor_sequence}')"><span>HTML 편집기</span></a></li>
|
||||
<li id="use_html_{$editor_sequence}"><a href="#htmlEditor" onclick="editorChangeMode('html', '{$editor_sequence}')"><span>{$lang->edit->html_editor}</span></a></li>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</ul>
|
||||
|
||||
<!-- 에디터 -->
|
||||
<div id="xeEditor" class="xeEditor rich">
|
||||
<div id="xeEditor_{$editor_sequence}" class="xeEditor rich">
|
||||
<!-- class="xeEditor rich" | class="xeEditor html" -->
|
||||
|
||||
<div id="xeEditorOption_{$editor_sequence}" class="toolBox">
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
<!--@if($enable_default_component)-->
|
||||
<!-- 기본 컴포넌트 출력 -->
|
||||
<ul class="do item">
|
||||
<li class="undo"><button type="button" title="Ctrl+Z:Un Do"><span>Un Do</span></button></li>
|
||||
<li class="redo"><button type="button" title="Ctrl+Y:Re Do"><span>Re Do</span></button></li>
|
||||
<li class="undo"><button type="button" onclick="editorUnDo(this,'{$editor_sequence}')" id="editor_undo_{$editor_sequence}" title="Ctrl+Z:Un Do"><span>Un Do</span></button></li>
|
||||
<li class="redo"><button type="button" onclick="editorReDo(this,'{$editor_sequence}')" id="editor_redo_{$editor_sequence}" title="Ctrl+Y:Re Do"><span>Re Do</span></button></li>
|
||||
</ul>
|
||||
|
||||
<ul class="type item">
|
||||
|
|
@ -72,8 +72,8 @@
|
|||
<li class="underline"><button type="button" title="Ctrl+U:{$lang->edit->help_underline}" id="component_{$editor_sequence}_Underline"><span>Underline</span></button></li>
|
||||
<li class="italic"><button type="button" title="Ctrl+I:{$lang->edit->help_italic}" id="component_{$editor_sequence}_Italic"><span>Italic</span></button></li>
|
||||
<li class="strike"><button type="button" title="{$lang->edit->help_strike_through}" id="component_{$editor_sequence}_StrikeThrough"><span>Strike</span></button></li>
|
||||
<li class="sup"><button type="button" title="Sup"><span>Sup</span></button></li>
|
||||
<li class="sub"><button type="button" title="Sub"><span>Sub</span></button></li>
|
||||
<li class="sup"><button type="button" title="Sup" id="component_{$editor_sequence}_Superscript"><span>Sup</span></button></li>
|
||||
<li class="sub"><button type="button" title="Sub" id="component_{$editor_sequence}_Subscript"><span>Sub</span></button></li>
|
||||
<li class="txColor"><button type="button" title="{$lang->edit->help_fontcolor}" id="component_{$editor_sequence}_colorpicker_text"><span>Text Color</span></button></li>
|
||||
<li class="bgColor"><button type="button" title="{$lang->edit->help_fontbgcolor}" id="component_{$editor_sequence}_colorpicker_bg"><span>Background Color</span></button></li>
|
||||
<li class="styleRemover"><button type="button" title="Ctrl+D:{$lang->edit->help_remove_format}" id="component_{$editor_sequence}_RemoveFormat"><span>Style Remover</span></button></li>
|
||||
|
|
@ -103,11 +103,11 @@
|
|||
<!--@end-->
|
||||
<!--@if($enable_component)-->
|
||||
<!-- 확장 컴포넌트 출력 -->
|
||||
<div class="extension2">
|
||||
<button type="button" class="exButton" title="확장 콤포넌트"><span>확장 콤포넌트</span></button>
|
||||
<div class="extension2" id="editorExtension_{$editor_sequence}">
|
||||
<button type="button" class="exButton" title="{$lang->edit->extension}" onclick="showEditorExtension(event,{$editor_sequence})"><span>{$lang->edit->extension}</span></button>
|
||||
<ul id="editor_component_{$editor_sequence}">
|
||||
<!--@foreach($component_list as $component_name => $component)-->
|
||||
<!--@if(substr($component_name,0,11)!="colorpicker")-->
|
||||
<!--@if(!in_array($component_name,array('colorpicker_bg','colorpicker_text','emoticon','image_gallery','image_link','multimedia_link','quotation','table_maker','url_link')))-->
|
||||
<li><button type="button" id="component_{$editor_sequence}_{$component_name}"><span><img src="../../components/{$component_name}/icon.gif" alt="" /> {$component->title}</span></button></li>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
|
|
@ -115,15 +115,15 @@
|
|||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<div class="editorHelp">
|
||||
<button type="button" class="helpButton" title="도움말"><span>도움말</span></button>
|
||||
<ul id="helpList">
|
||||
<div class="editorHelp" id="editorHelp_{$editor_sequence}">
|
||||
<button type="button" class="helpButton" title="{$lang->edit->help}" onclick="showEditorHelp(event,{$editor_sequence})"><span>{$lang->edit->help}</span></button>
|
||||
<ul id="helpList_{$editor_sequence}" class="helpList">
|
||||
<!--@if(!$_COOKIE['EditorInfo'])-->
|
||||
<!-- 에디터 안내 출력 -->
|
||||
<li>{$lang->about_dblclick_in_editor}</li>
|
||||
<li>{$lang->edit->help_use_paragrapth}</li>
|
||||
<!--@end-->
|
||||
<li>단축키 안내
|
||||
<li>{$lang->edit->help_command}
|
||||
<ul>
|
||||
<li>Un Do : Ctrl+Z</li>
|
||||
<li>Re Do : Ctrl+Y</li>
|
||||
|
|
@ -144,8 +144,11 @@
|
|||
|
||||
<!-- 에디터 출력 -->
|
||||
<iframe id="editor_iframe_{$editor_sequence}" class="richEditor" frameborder="0" height="{$editor_height}"></iframe>
|
||||
|
||||
<textarea id="editor_textarea_{$editor_sequence}" class="htmlEditor" style="height:{$editor_height}" rows="5" cols="20"></textarea>
|
||||
|
||||
<div class="mask" id="xeEditorMask_{$editor_sequence}"></div>
|
||||
|
||||
<!-- 에디터 크기 조절 bar -->
|
||||
<!--@if($enable_resizable)-->
|
||||
<div class="textAreaDragIndicator"><button type="button" id="editor_drag_bar_{$editor_sequence}"></button></div>
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height, f
|
|||
// editorMode를 기본으로 설정
|
||||
editorMode[editor_sequence] = null;
|
||||
|
||||
// 에디터를 시작 시킴
|
||||
try {
|
||||
// 에디터를 시작 시킴
|
||||
try {
|
||||
iframe_obj.contentWindow.document.designMode = 'On';
|
||||
} catch(e) {
|
||||
}
|
||||
|
|
@ -148,11 +148,11 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height, f
|
|||
/**
|
||||
* 더블클릭이나 키눌림등의 각종 이벤트에 대해 listener 추가
|
||||
* 작성시 필요한 이벤트 체크
|
||||
* 이 이벤트의 경우 윈도우 sp1 (NT or xp sp1) 에서 iframe_obj.contentWindow.document에 대한 권한이 없기에 try 문으로 감싸서
|
||||
* 이 이벤트의 경우 윈도우 sp1 (NT or xp sp1) 에서 iframe_obj.contentWindow.document에 대한 권한이 없기에 try 문으로 감싸서
|
||||
* 에러를 무시하도록 해야 함.
|
||||
**/
|
||||
|
||||
// 위젯 감시를 위한 더블클릭 이벤트 걸기
|
||||
// 위젯 감시를 위한 더블클릭 이벤트 걸기
|
||||
try {
|
||||
xAddEventListener(iframe_obj.contentWindow.document,'dblclick',editorSearchComponent);
|
||||
} catch(e) {
|
||||
|
|
@ -209,7 +209,7 @@ function editorKeyPress(evt) {
|
|||
switch(pTag) {
|
||||
case 'li' :
|
||||
return;
|
||||
break;
|
||||
break;
|
||||
default :
|
||||
obj.pasteHTML("<br />");
|
||||
break;
|
||||
|
|
@ -301,11 +301,19 @@ function editorKeyPress(evt) {
|
|||
xStopPropagation(evt);
|
||||
break;
|
||||
// underline
|
||||
case 117 :
|
||||
case 117 :
|
||||
editorDo('Underline',null,e.target);
|
||||
xPreventDefault(evt);
|
||||
xStopPropagation(evt);
|
||||
break;
|
||||
//RemoveFormat
|
||||
case 100 :
|
||||
editorDo('RemoveFormat',null,e.target);
|
||||
xPreventDefault(evt);
|
||||
xStopPropagation(evt);
|
||||
break;
|
||||
|
||||
|
||||
// strike
|
||||
/*
|
||||
case 83 :
|
||||
|
|
@ -363,6 +371,16 @@ function editorChangeFontSize(obj,srl) {
|
|||
obj.selectedIndex = 0;
|
||||
}
|
||||
|
||||
function editorUnDo(obj,srl) {
|
||||
editorDo('undo','',srl);
|
||||
obj.selectedIndex = 0;
|
||||
}
|
||||
|
||||
function editorReDo(obj,srl) {
|
||||
editorDo('redo','',srl);
|
||||
obj.selectedIndex = 0;
|
||||
}
|
||||
|
||||
function editorChangeHeader(obj,srl) {
|
||||
var value = obj.options[obj.selectedIndex].value;
|
||||
if(!value) return;
|
||||
|
|
@ -374,6 +392,49 @@ function editorChangeHeader(obj,srl) {
|
|||
/**
|
||||
* HTML 편집 기능 활성/비활성
|
||||
**/
|
||||
|
||||
function editorChangeMode(mode, editor_sequence) {
|
||||
var iframe_obj = editorGetIFrame(editor_sequence);
|
||||
if(!iframe_obj) return;
|
||||
|
||||
var textarea_obj = editorGetTextArea(editor_sequence);
|
||||
xWidth(textarea_obj, xWidth(iframe_obj.parentNode));
|
||||
xHeight(textarea_obj, xHeight(iframe_obj.parentNode));
|
||||
|
||||
var contentDocument = iframe_obj.contentWindow.document;
|
||||
|
||||
// html 편집 사용시
|
||||
if(mode == 'html') {
|
||||
var html = contentDocument.body.innerHTML;
|
||||
html = html.replace(/<br>/ig,"<br />\n");
|
||||
html = html.replace(/<br \/>\n\n/ig,"<br />\n");
|
||||
textarea_obj.value = html;
|
||||
|
||||
// iframe_obj.parentNode.style.display = "none";
|
||||
xGetElementById('xeEditor_'+editor_sequence).className = 'xeEditor html';
|
||||
editorMode[editor_sequence] = 'html';
|
||||
|
||||
xGetElementById('use_rich_'+editor_sequence).className = '';
|
||||
xGetElementById('use_html_'+editor_sequence).className = 'active';
|
||||
|
||||
|
||||
// 위지윅 모드 사용시
|
||||
} else {
|
||||
var html = textarea_obj.value;
|
||||
contentDocument.body.innerHTML = html;
|
||||
|
||||
// iframe_obj.parentNode.style.display = "block";
|
||||
xGetElementById('xeEditor_'+editor_sequence).className = 'xeEditor rich';
|
||||
editorMode[editor_sequence] = null;
|
||||
|
||||
xGetElementById('use_rich_'+editor_sequence).className = 'active';
|
||||
xGetElementById('use_html_'+editor_sequence).className = '';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
function editorChangeMode(obj, editor_sequence) {
|
||||
var iframe_obj = editorGetIFrame(editor_sequence);
|
||||
if(!iframe_obj) return;
|
||||
|
|
@ -385,7 +446,7 @@ function editorChangeMode(obj, editor_sequence) {
|
|||
var contentDocument = iframe_obj.contentWindow.document;
|
||||
|
||||
// html 편집 사용시
|
||||
if(obj.checked) {
|
||||
if(obj.checked || obj == 'html') {
|
||||
var html = contentDocument.body.innerHTML;
|
||||
html = html.replace(/<br>/ig,"<br />\n");
|
||||
html = html.replace(/<br \/>\n\n/ig,"<br />\n");
|
||||
|
|
@ -409,11 +470,49 @@ function editorChangeMode(obj, editor_sequence) {
|
|||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
// Editor Info Close
|
||||
function closeEditorInfo(editor_sequence) {
|
||||
xGetElementById('editorInfo_'+editor_sequence).style.display='none';
|
||||
xGetElementById('editorInfo_'+editor_sequence).style.display='none';
|
||||
var expire = new Date();
|
||||
expire.setTime(expire.getTime()+ (7000 * 24 * 3600000));
|
||||
xSetCookie('EditorInfo', '1', expire);
|
||||
}
|
||||
|
||||
|
||||
function showEditorHelp(e,editor_sequence){
|
||||
var oid = 'editorHelp_'+editor_sequence;
|
||||
|
||||
if(xGetElementById(oid).className =='editorHelp'){
|
||||
|
||||
xGetElementById(oid).className = 'editorHelp open';
|
||||
if(e.pageX <= xWidth('helpList_'+editor_sequence)){
|
||||
xGetElementById('helpList_'+editor_sequence).style.right='auto';
|
||||
xGetElementById('helpList_'+editor_sequence).style.left='0';
|
||||
}else{
|
||||
xGetElementById('helpList_'+editor_sequence).style.right='0';
|
||||
xGetElementById('helpList_'+editor_sequence).style.left='';
|
||||
}
|
||||
}else{
|
||||
xGetElementById(oid).className = 'editorHelp';
|
||||
}
|
||||
}
|
||||
|
||||
function showEditorExtension(e,editor_sequence){
|
||||
var oid = 'editorExtension_'+editor_sequence;
|
||||
if(xGetElementById(oid).className =='extension2'){
|
||||
xGetElementById(oid).className = 'extension2 open';
|
||||
|
||||
if(e.pageX <= xWidth('editor_component_'+editor_sequence)){
|
||||
xGetElementById('editor_component_'+editor_sequence).style.right='auto';
|
||||
xGetElementById('editor_component_'+editor_sequence).style.left='0';
|
||||
}else{
|
||||
xGetElementById('editor_component_'+editor_sequence).style.right='0';
|
||||
xGetElementById('editor_component_'+editor_sequence).style.left='';
|
||||
}
|
||||
|
||||
}else{
|
||||
xGetElementById(oid).className = 'extension2';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,10 +97,12 @@ function editorRemoveSavedDoc() {
|
|||
// editor_sequence값에 해당하는 iframe의 object를 return
|
||||
function editorGetIFrame(editor_sequence) {
|
||||
if(editorRelKeys != undefined && editorRelKeys[editor_sequence] != undefined && editorRelKeys[editor_sequence]['editor'] != undefined)
|
||||
return editorRelKeys[editor_sequence]['editor'].getFrame();
|
||||
return editorRelKeys[editor_sequence]['editor'].getFrame();
|
||||
return xGetElementById( 'editor_iframe_'+ editor_sequence );
|
||||
}
|
||||
|
||||
function editorGetTextarea(editor_sequence) {
|
||||
return xGetElementById( 'editor_textarea_'+ editor_sequence );
|
||||
}
|
||||
/**
|
||||
* iframe 세로 크기 조절 드래그 관련
|
||||
**/
|
||||
|
|
@ -118,15 +120,21 @@ function editorDragStart(evt) {
|
|||
editorDragObj.id = id.substr('editor_drag_bar_'.length);
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
var textarea_obj = editorGetTextarea(editorDragObj.id);
|
||||
|
||||
editorDragObj.source_height = xHeight(iframe_obj);
|
||||
xGetElementById('xeEditorMask_' + editorDragObj.id).style.display='block';
|
||||
|
||||
xAddEventListener(document, 'mousemove', editorDragMove, false);
|
||||
xAddEventListener(editorDragObj.obj, 'mousemove', editorDragMove, false);
|
||||
xAddEventListener(document, 'mousemove', editorDragMove, true);
|
||||
// xAddEventListener(editorDragObj.obj, 'mousemove', editorDragMove, false);
|
||||
}
|
||||
|
||||
function editorDragMove(evt) {
|
||||
if(!editorDragObj.isDrag) return;
|
||||
|
||||
if(!editorDragObj.isDrag){
|
||||
if(editorDragObj.id) xGetElementById('xeEditorMask_' + editorDragObj.id).style.display='none';
|
||||
return;
|
||||
}
|
||||
|
||||
var e = new xEvent(evt);
|
||||
var h = e.pageY - editorDragObj.y;
|
||||
|
|
@ -135,37 +143,48 @@ function editorDragMove(evt) {
|
|||
editorDragObj.y = e.pageY;
|
||||
editorDragObj.obj = e.target;
|
||||
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
xHeight(iframe_obj, xHeight(iframe_obj)+h);
|
||||
xHeight(iframe_obj.parentNode, xHeight(iframe_obj)+10);
|
||||
var textarea_obj = editorGetTextarea(editorDragObj.id);
|
||||
var height = xHeight(iframe_obj) || xHeight(textarea_obj);
|
||||
height += h;
|
||||
xHeight(iframe_obj, height);
|
||||
xHeight(textarea_obj, height);
|
||||
xHeight(iframe_obj.parentNode, height+10);
|
||||
}
|
||||
|
||||
function editorDragStop(evt) {
|
||||
if(!editorDragObj.isDrag) return;
|
||||
if(editorDragObj.id) xGetElementById('xeEditorMask_'+editorDragObj.id).style.display='none';
|
||||
if(!editorDragObj.isDrag){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
xRemoveEventListener(document, 'mousemove', editorDragMove, false);
|
||||
xRemoveEventListener(editorDragObj.obj, 'mousemove', editorDragMove, false);
|
||||
// xRemoveEventListener(editorDragObj.obj, 'mousemove', editorDragMove, false);
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||
var textarea_obj = editorGetTextarea(editorDragObj.id);
|
||||
if(typeof(fixAdminLayoutFooter)=='function') fixAdminLayoutFooter(xHeight(iframe_obj)-editorDragObj.source_height);
|
||||
|
||||
|
||||
editorDragObj.isDrag = false;
|
||||
editorDragObj.y = 0;
|
||||
editorDragObj.obj = null;
|
||||
editorDragObj.id = '';
|
||||
}
|
||||
|
||||
// Editor Option Button
|
||||
// Editor Option Button
|
||||
function eOptionOver(obj) {
|
||||
obj.style.marginTop='-21px';
|
||||
obj.style.zIndex='99';
|
||||
obj.style.marginTop='-21px';
|
||||
obj.style.zIndex='99';
|
||||
}
|
||||
function eOptionOut(obj) {
|
||||
obj.style.marginTop='0';
|
||||
obj.style.zIndex='1';
|
||||
obj.style.marginTop='0';
|
||||
obj.style.zIndex='1';
|
||||
}
|
||||
function eOptionClick(obj) {
|
||||
obj.style.marginTop='-42px';
|
||||
obj.style.marginTop='-42px';
|
||||
obj.style.zIndex='99';
|
||||
}
|
||||
|
||||
|
|
@ -178,7 +197,7 @@ var editorPrevSrl = null;
|
|||
function editorEventCheck(evt) {
|
||||
editorPrevNode = null;
|
||||
|
||||
// 이벤트가 발생한 object의 ID를 구함
|
||||
// 이벤트가 발생한 object의 ID를 구함
|
||||
var e = new xEvent(evt);
|
||||
var target_id = e.target.id;
|
||||
if(!target_id) return;
|
||||
|
|
@ -194,7 +213,7 @@ function editorEventCheck(evt) {
|
|||
|
||||
switch(component_name) {
|
||||
|
||||
// 기본 기능에 대한 동작 (바로 실행)
|
||||
// 기본 기능에 대한 동작 (바로 실행)
|
||||
case 'Bold' :
|
||||
case 'Italic' :
|
||||
case 'Underline' :
|
||||
|
|
@ -247,7 +266,7 @@ function editorSearchComponent(evt) {
|
|||
|
||||
editorPrevNode = null;
|
||||
var obj = e.target;
|
||||
|
||||
|
||||
// 위젯인지 일단 체크
|
||||
if(obj.getAttribute("widget")) {
|
||||
// editor_sequence을 찾음
|
||||
|
|
@ -291,7 +310,7 @@ function editorSearchComponent(evt) {
|
|||
} else if(obj.nodeName == "TD") {
|
||||
editor_component = "table_maker";
|
||||
editorPrevNode = obj;
|
||||
|
||||
|
||||
// 링크거나 텍스트인 경우
|
||||
} else if(obj.nodeName == "A" || obj.nodeName == "BODY" || obj.nodeName.indexOf("H")==0 || obj.nodeName == "LI" || obj.nodeName == "P") {
|
||||
editor_component = "url_link";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue