diff --git a/modules/editor/skins/xeed/editor.html b/modules/editor/skins/xeed/editor.html new file mode 100644 index 000000000..03c3830b2 --- /dev/null +++ b/modules/editor/skins/xeed/editor.html @@ -0,0 +1,1348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + +
    + +
  • + +
+ + +
+
+ +
    +
  • +
  • +
+
    +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
  • +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
  • +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
  • +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    +
  • +
+
    +
  • +
  • +
  • +
  • +
  • +
    +
    + 글꼴색 +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    + + +
    +
    +
    + 배경색 +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    + + +
    +
    +
    + 미리보기 +

    무궁화 꽃이 피었습니다

    +
    + +
    +
  • +
  • +
  • +
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
    +
  • +
+
    +
  • +
    +
    + + + + + + + + + +
    +
    +
  • +
  • +
    +
      +
    • +
        +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      +
    • +
    • +
        +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      +
    • +
    • +
        +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      +
    • +
    • +
        +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      +
    • +
    • +
        +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      +
    • +
    • +
        +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      • +
      +
    • +
    +
    + + + + + +
    +
    +
  • +
  • +
    +
    + 미리보기 +
    + + + + + + + + + + + + + + + + + +
    Caption
    TDTDTD
    TDTDTD
    TDTDTD
    +
    +
    +
    + 표 제목(caption) 및 배치 +
    + + +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    +
    +
    + 머리글 셀(th) +
      +
    • +
    • +
    • +
    • +
    +
    +
    + 표 크기 + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    +
  • + + + +
+
+
+ + + +
+
+
+ + + +
+

글을 쓰기 시작한지 1시간이 지났습니다. 마지막 저장 시간은 10분 전 입니다.

+
+ + + +
+ +
+ + +
+ +
+ +
+ + + +
+
+
+ +
+
+

첨부목록 [0]

+
+
+
+

이미지

+
    +
  • + + + + +
  • +
+

+ + +

+

첨부된 이미지가 없습니다.

+
+
+

동영상

+
    +

    + + +

    +

    첨부된 이미지가 없습니다.

    +
    +
    +

    파일

    +
      +

      + + +

      +

      첨부된 이미지가 없습니다.

      +
      +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      + + + + + + diff --git a/modules/editor/skins/xeed/js/xe_interface.js b/modules/editor/skins/xeed/js/xe_interface.js new file mode 100644 index 000000000..f648cf461 --- /dev/null +++ b/modules/editor/skins/xeed/js/xe_interface.js @@ -0,0 +1,55 @@ +(function($){ + +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; + + if(typeof(colorset)=='undefined') colorset = 'white'; + if(typeof(content_style)=='undefined') content_style = 'xeStyle'; + if(typeof(content_font)=='undefined') content_font= ''; + if(typeof(content_font_size)=='undefined') content_font_size= ''; + + $textarea = $('#xeed-'+editor_seq); + $form = $($textarea[0].form).attr('editor_sequence', editor_seq); + $input = $form.find('input[name='+content_key+']'); + + if($input[0]) $textarea.val($input.remove().val()).attr('name', content_key); + $textarea.attr('name', content_key); + + // create an editor + xe.Editors[editor_seq] = xeed = new xe.Xeed($textarea); + xe.registerApp(xeed); + + // 자동 저장 사용 + if (as=form.elements['_saved_doc_title']) { + //xeed.registerPlugin(new xe.XE_AutoSave(oIRTextarea, elAppContainer)); + } + + // Set standard API + editorRelKeys[editor_seq] = { + primary : $form[0][primary_key], + content : $form[0][content_key], + editor : xeed, + func : function(){ return xeed.cast('GET_CONTENT'); }, + pasteHTML : function(text){ xeed.cast('PASTE_HTML', [text]); } + }; + + return xeed; +} + +window.editorStart_xe = editorStart_xe; + +})(jQuery); + +function editorGetAutoSavedDoc(form) { + var param = new Array(); + param['mid'] = current_mid; + param['editor_sequence'] = form.getAttribute('editor_sequence') + setTimeout(function() { + var response_tags = new Array("error","message","editor_sequence","title","content","document_srl"); + exec_xml('editor',"procEditorLoadSavedDocument", param, function(a,b,c) { editorRelKeys[param['editor_sequence']]['primary'].value = a['document_srl']; if(typeof(uploadSettingObj[param['editor_sequence']]) == 'object') editorUploadInit(uploadSettingObj[param['editor_sequence']], true); }, response_tags); + }, 0); + +} diff --git a/modules/editor/skins/xeed/js/xe_textarea.js b/modules/editor/skins/xeed/js/xe_textarea.js new file mode 100644 index 000000000..2e188ff10 --- /dev/null +++ b/modules/editor/skins/xeed/js/xe_textarea.js @@ -0,0 +1,41 @@ +function editorStartTextarea(editor_sequence, content_key, primary_key) { + var obj = xGetElementById('editor_'+editor_sequence); + var use_html = xGetElementById('htm_'+editor_sequence).value; + obj.form.setAttribute('editor_sequence', editor_sequence); + + obj.style.width = '99%'; + + editorRelKeys[editor_sequence] = new Array(); + editorRelKeys[editor_sequence]["primary"] = obj.form[primary_key]; + editorRelKeys[editor_sequence]["content"] = obj.form[content_key]; + editorRelKeys[editor_sequence]["func"] = editorGetContentTextarea; + + var content = obj.form[content_key].value; + if(use_html) { + content = content.replace(/]*)>/ig,"\n"); + if(use_html!='br') { + content = content.replace(/</g, "<"); + content = content.replace(/>/g, ">"); + content = content.replace(/"/g, '"'); + content = content.replace(/&/g, "&"); + } + } + obj.value = content; +} + +function editorGetContentTextarea(editor_sequence) { + var obj = xGetElementById('editor_'+editor_sequence); + var use_html = xGetElementById('htm_'+editor_sequence).value; + var content = obj.value.trim(); + if(use_html) { + if(use_html!='br') { + content = content.replace(/&/g, "&"); + content = content.replace(//g, ">"); + content = content.replace(/\"/g, """); + } + content = content.replace(/(\r\n|\n)/g, "
      "); + } + return content; +} + diff --git a/modules/editor/skins/xeed/js/xeed.js b/modules/editor/skins/xeed/js/xeed.js new file mode 100644 index 000000000..140a81676 --- /dev/null +++ b/modules/editor/skins/xeed/js/xeed.js @@ -0,0 +1,4678 @@ +/* + * XEED - XpressEngine WYSIWYG Editor + * @author nhn (developers@xpressengine.com) + */ +(function($){ + +var d = document, fn, dp, dc, + rx_command = /(?:^| )@(\w+)(?: |$)/, + rx_block = /^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/i, + invisibleCh = '\uFEFF', + _nt_ = 'nodeType', + _nn_ = 'nodeName', + _ps_ = 'previousSibling', + _ns_ = 'nextSibling', + _pn_ = 'parentNode', + _cn_ = 'childNodes', + _ca_ = 'commonAncestorContainer', + _sc_ = 'startContainer', + _so_ = 'startOffset', + _ec_ = 'endContainer', + _eo_ = 'endOffset', + _osc_ = 'oStartContainer', + _iso_ = 'iStartOffset', + _oec_ = 'oEndContainer', + _ieo_ = 'iEndOffset', + _xr_ = '_xeed_root', + rx_root = new RegExp('(?:^|\\s)'+_xr_+'(?:\\s|$)'), + Xeed, XHTMLT, Simple, Block, Font, Filter, EditMode, LineBreak, Resize, UndoRedo, SChar, Table, URL, AutoSave, FindReplace, Clear, DOMFix; + +Xeed = xe.createApp('Xeed', { + $textarea : null, + $richedit : null, + $toolbar : null, + $root : null, + _options : null, + last_node : null, + + /** + * @brief constructor + */ + init : function(obj, options) { + var self=this, $obj=$(obj), $text, $edit, opts, content, plugins, i, c, tmpId; + + // Options + opts = $.extend({ + minHeight : 400 + }, options); + this._options = opts; + + // + if ($obj.is('textarea')) { + $text = $obj; + content = $obj.val(); + } else { + $text = $obj.before('