mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 15:49:57 +09:00
자동저장 관련 기능 지원
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7889 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
37d945e64f
commit
3c5c2d214a
2 changed files with 56 additions and 13 deletions
|
|
@ -4,7 +4,7 @@ if (!window.xe) xe = {};
|
|||
if (!xe.Editors) xe.Editors = [];
|
||||
|
||||
function editorStart_xe(editor_seq, primary_key, content_key, editor_height, colorset, content_style, content_font, content_font_size) {
|
||||
var $textarea, $form, $input, saved_str, xeed, as;
|
||||
var $textarea, $form, $input, saved_str, xeed, opt = {};
|
||||
|
||||
if(typeof(colorset)=='undefined') colorset = 'white';
|
||||
if(typeof(content_style)=='undefined') content_style = 'xeStyle';
|
||||
|
|
@ -17,16 +17,14 @@ function editorStart_xe(editor_seq, primary_key, content_key, editor_height, col
|
|||
|
||||
if($input[0]) $textarea.val($input.remove().val()).attr('name', content_key);
|
||||
$textarea.attr('name', content_key);
|
||||
|
||||
// Use auto save feature?
|
||||
opt.use_autosave = !!$form[0].elements['_saved_doc_title'];
|
||||
|
||||
// create an editor
|
||||
xe.Editors[editor_seq] = xeed = new xe.Xeed($textarea);
|
||||
xe.Editors[editor_seq] = xeed = new xe.Xeed($textarea, opt);
|
||||
xe.registerApp(xeed);
|
||||
|
||||
// 자동 저장 사용
|
||||
if (as=$form[0].elements['_saved_doc_title']) {
|
||||
//xeed.registerPlugin(new xe.XE_AutoSave(oIRTextarea, elAppContainer));
|
||||
}
|
||||
|
||||
// Set standard API
|
||||
editorRelKeys[editor_seq] = {
|
||||
primary : $form[0][primary_key],
|
||||
|
|
@ -35,6 +33,9 @@ function editorStart_xe(editor_seq, primary_key, content_key, editor_height, col
|
|||
func : function(){ return xeed.cast('GET_CONTENT'); },
|
||||
pasteHTML : function(text){ xeed.cast('PASTE_HTML', [text]); }
|
||||
};
|
||||
|
||||
// Auto save
|
||||
if (opt.use_autosave) xeed.registerPlugin(new xe.Xeed.AutoSave());
|
||||
|
||||
return xeed;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue