editorGetContent를 공용사용하게 하여 preview, temp save load가 xquared에서도 가능도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3049 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2007-11-22 17:29:04 +00:00
parent a1baa34a31
commit 671182b766
4 changed files with 12 additions and 15 deletions

View file

@ -23,10 +23,9 @@ function getAdditionalAutocompletions() {
];
}
function editorSync_xq(editor_sequence) {
function editorGetContent_xq(editor_sequence) {
var editor = editorRelKeys[editor_sequence]['editor'];
editorRelKeys[editor_sequence]['content'].value = editor.getCurrentContent(true);
return;
return editor.getCurrentContent(true);
}
function editorStart_xq(editor, element, editor_sequence, content_key, editor_height, primary_key) {
@ -34,7 +33,7 @@ function editorStart_xq(editor, element, editor_sequence, content_key, editor_he
editorRelKeys[editor_sequence] = new Array();
editorRelKeys[editor_sequence]['editor'] = editor;
editorRelKeys[editor_sequence]['func'] = editorSync_xq;
editorRelKeys[editor_sequence]['func'] = editorGetContent_xq;
editorMode[editor_sequence] = null;
var fo_obj = editorGetForm_xq(element);
fo_obj.setAttribute('editor_sequence', editor_sequence);

View file

@ -25,11 +25,6 @@ function editorGetTextArea(editor_sequence) {
return xGetElementById( 'editor_textarea_' + editor_sequence );
}
function editorSync(editor_sequence) {
editorRelKeys[editor_sequence]['content'].value = editorGetContent(editor_sequence);
}
// editor_sequence에 해당하는 form문 구함
function editorGetForm(editor_sequence) {
var iframe_obj = editorGetIFrame(editor_sequence);
@ -42,7 +37,7 @@ function editorGetForm(editor_sequence) {
}
// 에디터의 전체 내용 return
function editorGetContent(editor_sequence) {
function editorGetContent_xe(editor_sequence) {
var html = "";
if(editorMode[editor_sequence]=='html') {
var textarea_obj = editorGetTextArea(editor_sequence);
@ -110,7 +105,7 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height) {
editorRelKeys[editor_sequence] = new Array();
editorRelKeys[editor_sequence]["primary"] = fo_obj[primary_key];
editorRelKeys[editor_sequence]["content"] = fo_obj[content_key];
editorRelKeys[editor_sequence]["func"] = editorSync;
editorRelKeys[editor_sequence]["func"] = editorGetContent_xe;
// saved document(자동저장 문서)에 대한 확인
if(typeof(fo_obj._saved_doc_title)!="undefined" ) { ///<< _saved_doc_title field가 없으면 자동저장 하지 않음

View file

@ -5,3 +5,8 @@ var editorMode = new Array(); ///<< 에디터의 html편집 모드 flag 세팅
var editorAutoSaveObj = {fo_obj:null, editor_sequence:0, title:'', content:'', locked:false} ///< 자동저장을 위한 정보를 가진 object
var editorRelKeys = new Array(); ///< 에디터와 각 모듈과의 연동을 위한 key 값을 보관하는 변수
var editorDragObj = {isDrag:false, y:0, obj:null, id:'', det:0, source_height:0}
function editorGetContent(editor_sequence) {
return editorRelKeys[editor_sequence]["func"](editor_sequence);
}