mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
issue 671 added function of editor resize by contents height
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10316 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5c1edd8868
commit
f8dd9888f6
5 changed files with 109 additions and 24 deletions
|
|
@ -422,6 +422,9 @@
|
|||
<li class="html"><span><button class="xpress_xeditor_mode_toggle_button" type="button" title="{$lang->edit->html_editor}">{$lang->edit->html_editor}</button></span></li>
|
||||
<!--// li class="preview"><span><button type="button" class="xpress_xeditor_preview_button" title="{$lang->cmd_preview}">{$lang->cmd_preview}</button></span></li-->
|
||||
</ul>
|
||||
<ul style="line-height:21px;float:right;">
|
||||
<li class="xpress_xeditor_ui_editorresize"><input type="checkbox" id="editorresize"><label for="editorresize" style="font-size:11px">입력창 크기 자동 조절</label></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5047,6 +5047,44 @@ xe.XE_EditingModeToggler = $.Class({
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
xe.XE_Editorresize = $.Class({
|
||||
name : "XE_Editorresize",
|
||||
$init : function(elAppContainer, oWYSIWYGIFrame){
|
||||
this.inputArea = $('.xpress_xeditor_editing_area_container', elAppContainer).get(0);
|
||||
this.oVerticalResizer = $('.xpress_xeditor_editingArea_verticalResizer', elAppContainer).get(0);
|
||||
this.oCheckBox = $('#editorresize', elAppContainer).get(0);
|
||||
this.oIframe = oWYSIWYGIFrame;
|
||||
var self = this;
|
||||
$(oWYSIWYGIFrame).load(function(){
|
||||
self.oIframeBody = $(oWYSIWYGIFrame).contents().find('body');
|
||||
});
|
||||
},
|
||||
|
||||
$ON_MSG_APP_READY : function(){
|
||||
this.oApp.registerBrowserEvent(this.oCheckBox, 'change', 'XE_TOGGLE_EDITOR_RESIZE');
|
||||
},
|
||||
$ON_XE_TOGGLE_EDITOR_RESIZE : function(){
|
||||
if(this.oCheckBox.checked == true){
|
||||
if(this._prevHeight == undefined)
|
||||
this._prevHeight = this.inputArea.style.height;
|
||||
|
||||
this.oVerticalResizer.style.display = 'none';
|
||||
this.oApp.registerBrowserEvent(this.oIframeBody, 'keydown', 'XE_EDITOR_RESIZE');
|
||||
|
||||
this.inputArea.style.height = this.oIframe.style.height = this.oIframeBody[0].scrollHeight + 'px';
|
||||
}else{
|
||||
$(this.oIframeBody).unbind('keydown');
|
||||
|
||||
this.oVerticalResizer.style.display = 'block';
|
||||
this.inputArea.style.height = this._prevHeight;
|
||||
this.oIframe.style.height = this._prevHeight;
|
||||
}
|
||||
},
|
||||
$ON_XE_EDITOR_RESIZE : function(){
|
||||
this.inputArea.style.height = this.oIframe.style.height = this.oIframeBody[0].scrollHeight + 'px';
|
||||
}
|
||||
});
|
||||
//}
|
||||
/**
|
||||
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
|
||||
|
|
|
|||
|
|
@ -101,7 +101,9 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
|
|||
oEditor.registerPlugin(new xe.XE_EditingModeToggler(elAppContainer));
|
||||
}
|
||||
|
||||
|
||||
if(jQuery("#editorresize").length) {
|
||||
oEditor.registerPlugin(new xe.XE_Editorresize(elAppContainer, oWYSIWYGIFrame));
|
||||
}
|
||||
//oEditor.registerPlugin(new xe.XE_Preview(elAppContainer));
|
||||
|
||||
if (!jQuery.browser.msie && !jQuery.browser.opera) {
|
||||
|
|
|
|||
|
|
@ -5047,6 +5047,44 @@ xe.XE_EditingModeToggler = $.Class({
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
xe.XE_Editorresize = $.Class({
|
||||
name : "XE_Editorresize",
|
||||
$init : function(elAppContainer, oWYSIWYGIFrame){
|
||||
this.inputArea = $('.xpress_xeditor_editing_area_container', elAppContainer).get(0);
|
||||
this.oVerticalResizer = $('.xpress_xeditor_editingArea_verticalResizer', elAppContainer).get(0);
|
||||
this.oCheckBox = $('#editorresize', elAppContainer).get(0);
|
||||
this.oIframe = oWYSIWYGIFrame;
|
||||
var self = this;
|
||||
$(oWYSIWYGIFrame).load(function(){
|
||||
self.oIframeBody = $(oWYSIWYGIFrame).contents().find('body');
|
||||
});
|
||||
},
|
||||
|
||||
$ON_MSG_APP_READY : function(){
|
||||
this.oApp.registerBrowserEvent(this.oCheckBox, 'change', 'XE_TOGGLE_EDITOR_RESIZE');
|
||||
},
|
||||
$ON_XE_TOGGLE_EDITOR_RESIZE : function(){
|
||||
if(this.oCheckBox.checked == true){
|
||||
if(this._prevHeight == undefined)
|
||||
this._prevHeight = this.inputArea.style.height;
|
||||
|
||||
this.oVerticalResizer.style.display = 'none';
|
||||
this.oApp.registerBrowserEvent(this.oIframeBody, 'keydown', 'XE_EDITOR_RESIZE');
|
||||
|
||||
this.inputArea.style.height = this.oIframe.style.height = this.oIframeBody[0].scrollHeight + 'px';
|
||||
}else{
|
||||
$(this.oIframeBody).unbind('keydown');
|
||||
|
||||
this.oVerticalResizer.style.display = 'block';
|
||||
this.inputArea.style.height = this._prevHeight;
|
||||
this.oIframe.style.height = this._prevHeight;
|
||||
}
|
||||
},
|
||||
$ON_XE_EDITOR_RESIZE : function(){
|
||||
this.inputArea.style.height = this.oIframe.style.height = this.oIframeBody[0].scrollHeight + 'px';
|
||||
}
|
||||
});
|
||||
//}
|
||||
/**
|
||||
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
|
||||
|
|
@ -5867,7 +5905,9 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
|
|||
oEditor.registerPlugin(new xe.XE_EditingModeToggler(elAppContainer));
|
||||
}
|
||||
|
||||
|
||||
if(jQuery("#editorresize").length) {
|
||||
oEditor.registerPlugin(new xe.XE_Editorresize(elAppContainer, oWYSIWYGIFrame));
|
||||
}
|
||||
//oEditor.registerPlugin(new xe.XE_Preview(elAppContainer));
|
||||
|
||||
if (!jQuery.browser.msie && !jQuery.browser.opera) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
(function(c){function m(a){function b(a){return function(){return a.apply(this.$this,arguments)}}a=a.prototype;this.prototype.$super={};for(var d in a)a.propertyIsEnumerable(d)&&("undefined"==typeof this.prototype[d]&&(this.prototype[d]=a[d]),this.prototype.$super[d]=c.isFunction(a[d])?b(a[d]):a[d]);return this}c.extend({Class:function(a){function b(){"undefined"!=typeof this.$super&&(this.$super.$this=this);c.isFunction(this.$init)&&this.$init.apply(this,arguments)}b.prototype=a;b.constructor=b;
|
||||
b.extend=m;return b},$:function(a){return"string"==typeof a?"<"==a.substring(0,1)?c(a).get(0):c("#"+a).get(0):a},fnBind:function(a,b){var d=c.makeArray(arguments);d.shift();d.shift();return function(){var e=d.concat(c.makeArray(arguments));return a.apply(b,e)}}});c.browser.nVersion=parseFloat(c.browser.version);"undefined"==typeof window.xe&&(window.xe={});xe.XpressCore=c.Class({name:"XpressCore",$init:function(a){a=!a?{}:c.Class({}).extend({oDebugger:null}).extend(a);a.oDebugger&&(this.oDebugger=
|
||||
(function(c){function o(a){function b(a){return function(){return a.apply(this.$this,arguments)}}a=a.prototype;this.prototype.$super={};for(var d in a)a.propertyIsEnumerable(d)&&("undefined"==typeof this.prototype[d]&&(this.prototype[d]=a[d]),this.prototype.$super[d]=c.isFunction(a[d])?b(a[d]):a[d]);return this}c.extend({Class:function(a){function b(){"undefined"!=typeof this.$super&&(this.$super.$this=this);c.isFunction(this.$init)&&this.$init.apply(this,arguments)}b.prototype=a;b.constructor=b;
|
||||
b.extend=o;return b},$:function(a){return"string"==typeof a?"<"==a.substring(0,1)?c(a).get(0):c("#"+a).get(0):a},fnBind:function(a,b){var d=c.makeArray(arguments);d.shift();d.shift();return function(){var e=d.concat(c.makeArray(arguments));return a.apply(b,e)}}});c.browser.nVersion=parseFloat(c.browser.version);"undefined"==typeof window.xe&&(window.xe={});xe.XpressCore=c.Class({name:"XpressCore",$init:function(a){a=!a?{}:c.Class({}).extend({oDebugger:null}).extend(a);a.oDebugger&&(this.oDebugger=
|
||||
a.oDebugger,this.oDebugger.oApp=this);this.commandQueue=[];this.oCommandMap={};this.oDisabledCommand={};this.aPlugins=[];this.appStatus=xe.APP_STATUS.NOT_READY;this.registerPlugin(this)},exec:function(a,b,d){if(this.appStatus==xe.APP_STATUS.NOT_READY)return this.commandQueue[this.commandQueue.length]={msg:a,args:b,event:d},!0;this.exec=this._exec;this.exec(a,b,d)},delayedExec:function(a,b,d,e){a=c.fnBind(this.exec,this,a,b,e);setTimeout(a,d)},_exec:function(a,b,d){return(this._exec=this.oDebugger?
|
||||
this._execWithDebugger:this._execWithoutDebugger).call(this,a,b,d)},_execWithDebugger:function(a,b,d){this.oDebugger.log_MessageStart(a,b);d=this._doExec(a,b,d);this.oDebugger.log_MessageEnd(a,b);return d},_execWithoutDebugger:function(a,b,d){return this._doExec(a,b,d)},_doExec:function(a,b,d){var e=!1;if(!this.oDisabledCommand[a]){var c=[];if(b&&b.length)for(var e=b.length,g=0;g<e;g++)c[g]=b[g];d&&(c[c.length]=d);(e=this._execMsgStep("BEFORE",a,c))&&(e=this._execMsgStep("ON",a,c));e&&(e=this._execMsgStep("AFTER",
|
||||
a,c))}return e},registerPlugin:function(a){if(!a)throw"An error occured in registerPlugin(): invalid plug-in";a.nIdx=this.aPlugins.length;a.oApp=this;this.aPlugins[a.nIdx]=a;a.status!=xe.PLUGIN_STATUS.NOT_READY&&(a.status=xe.PLUGIN_STATUS.READY);this.exec("MSG_PLUGIN_REGISTERED",[a]);return a.nIdx},disableCommand:function(a,b){this.oDisabledCommand[a]=b},registerBrowserEvent:function(a,b,d,e,f){a&&(e=e||[],d=f?c.fnBind(this.delayedExec,this,d,e,f):c.fnBind(this.exec,this,d,e),c(a).bind(b,d))},run:function(){this._changeAppStatus(xe.APP_STATUS.WAITING_FOR_PLUGINS_READY);
|
||||
|
|
@ -9,7 +9,7 @@ if(a.match(/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/))for(var h=0;h<e;h++){if(c=this
|
|||
b,d);var e=a[b].apply(a,d);this.oDebugger.log_CallHandlerEnd(a,b,d);return e},_execHandlerWithoutDebugger:function(a,b,d){return a[b].apply(a,d)},_doAddToCommandMap:function(a,b){"function"==typeof b[a]&&(this.oCommandMap[a][this.oCommandMap[a].length]=b)},_waitForPluginReady:function(){for(var a=!0,b=0;b<this.aPlugins.length;b++)if(this.aPlugins[b].status==xe.PLUGIN_STATUS.NOT_READY){a=!1;break}a?this._changeAppStatus(xe.APP_STATUS.READY):setTimeout(c.fnBind(this._waitForPluginReady,this),100)}});
|
||||
xe.APP_STATUS={NOT_READY:0,WAITING_FOR_PLUGINS_READY:1,READY:2};xe.PLUGIN_STATUS={NOT_READY:0,READY:1};xe.W3CDOMRange=c.Class({$init:function(a){this._document=a||document;this.collapsed=!0;this.endContainer=this.commonAncestorContainer=this._document.body;this.endOffset=0;this.startContainer=this._document.body;this.startOffset=0},cloneContents:function(){var a=this._document.createDocumentFragment(),b=this._document.createDocumentFragment(),d=this._getNodesInRange();if(1>d.length)return a;d=this._constructClonedTree(d,
|
||||
b);if(b=b.firstChild)for(var b=b.firstChild,e;b;)e=b.nextSibling,a.appendChild(b),b=e;d=this._splitTextEndNodes({oStartContainer:d.oStartContainer,iStartOffset:this.startOffset,oEndContainer:d.oEndContainer,iEndOffset:this.endOffset});d.oStartContainer&&d.oStartContainer.previousSibling&&xe.DOMFix.parentNode(d.oStartContainer).removeChild(d.oStartContainer.previousSibling);d.oEndContainer&&d.oEndContainer.nextSibling&&xe.DOMFix.parentNode(d.oEndContainer).removeChild(d.oEndContainer.nextSibling);
|
||||
return a},_constructClonedTree:function(a,b){var d=null,e=null,c=this.startContainer,g=this.endContainer;_recurConstructClonedTree=function(a,b,j,o){if(0>b)return b;var j=b-1,n=a[b].cloneNode(!1);a[b]==c&&(d=n);for(a[b]==g&&(e=n);0<=j&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],n,d,e);o.insertBefore(n,o.firstChild);return j};a[a.length]=xe.DOMFix.parentNode(a[a.length-1]);_recurConstructClonedTree(a,a.length-1,a[a.length-1],b);return{oStartContainer:d,oEndContainer:e}},
|
||||
return a},_constructClonedTree:function(a,b){var d=null,e=null,c=this.startContainer,g=this.endContainer;_recurConstructClonedTree=function(a,b,j,n){if(0>b)return b;var j=b-1,m=a[b].cloneNode(!1);a[b]==c&&(d=m);for(a[b]==g&&(e=m);0<=j&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],m,d,e);n.insertBefore(m,n.firstChild);return j};a[a.length]=xe.DOMFix.parentNode(a[a.length-1]);_recurConstructClonedTree(a,a.length-1,a[a.length-1],b);return{oStartContainer:d,oEndContainer:e}},
|
||||
cloneRange:function(){return this._copyRange(new xe.W3CDOMRange(this._document))},_copyRange:function(a){a.collapsed=this.collapsed;a.commonAncestorContainer=this.commonAncestorContainer;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.startContainer=this.startContainer;a.startOffset=this.startOffset;a._document=this._document;return a},collapse:function(a){a?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=
|
||||
this.endOffset);this._updateRangeInfo()},compareBoundaryPoints:function(a,b){switch(a){case xe.W3CDOMRange.START_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.START_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.END_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.endContainer,b.endOffset);case xe.W3CDOMRange.END_TO_START:return this._compareEndPoint(this.startContainer,
|
||||
this.startOffset,b.endContainer,b.endOffset)}},_findBody:function(a){if(!a)return null;for(;a;){if("BODY"==a.tagName)return a;a=xe.DOMFix.parentNode(a)}return null},_compareEndPoint:function(a,b,d,e){if(!a||this._findBody(a)!=this._document.body)a=this._document.body,b=0;if(!d||this._findBody(d)!=this._document.body)d=this._document.body,e=0;var c=this._getCommonAncestorContainer(a,d);if(a!=c){for(;(oTmpNode=xe.DOMFix.parentNode(a))!=c;)a=oTmpNode;b=this._getPosIdx(a)+0.5}if(d!=c){for(;(oTmpNode=
|
||||
|
|
@ -31,8 +31,8 @@ c.Class({setWindow:function(a){this._window=a;this._document=a.document},$init:f
|
|||
getStartNode:function(){return this.collapsed?3==this.startContainer.nodeType?0==this.startOffset||this.startContainer.nodeValue.length<=this.startOffset?null:this.startContainer:null:3==this.startContainer.nodeType?this.startOffset>=this.startContainer.nodeValue.length?this._getNextNode(this.startContainer):this.startContainer:this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset]},getEndNode:function(){return this.collapsed?
|
||||
this.getStartNode():3==this.endContainer.nodeType?0==this.endOffset?this._getPrevNode(this.endContainer):this.endContainer:0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1]},getNodeAroundRange:function(a,b){if(this.collapsed&&this.startContainer&&3==this.startContainer.nodeType)return this.startContainer;if(!this.collapsed||this.startContainer&&3==this.startContainer.nodeType)return this.getStartNode();var d,e,c;e=this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?
|
||||
this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset];d=0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];a?(c=d,!c&&!b&&(c=e)):(c=e,!c&&!b&&(c=d));return c},_getXPath:function(a){for(var b="";a&&1==a.nodeType;)b="/"+a.tagName+"["+this._getPosIdx4XPath(a)+"]"+b,a=xe.DOMFix.parentNode(a);return b},_getPosIdx4XPath:function(a){for(var b=0,d=a.previousSibling;d;d=d.previousSibling)d.tagName==a.tagName&&
|
||||
b++;return b},_evaluateXPath:function(a,b){for(var a=a.substring(1,a.length-1),d=a.split(/\//),e=b.body,c=2;c<d.length&&e;c++){d[c].match(/([^\[]+)\[(\d+)/i);for(var g=RegExp.$1,h=RegExp.$2,e=xe.DOMFix.childNodes(e),k=[],j=e.length,o=0,n=0;n<j;n++)e[n].tagName==g&&(k[o++]=e[n]);e=k.length<h?null:k[h]}return e},_evaluateXPathBookmark:function(a){var b=a.nTextNodeIdx,d=a.nOffset,a=this._evaluateXPath(a.sXPath,this._document);if(-1<b&&a){for(var e=xe.DOMFix.childNodes(a),c=null;(c=e[b])&&3==c.nodeType&&
|
||||
c.nodeValue.length<d;)d-=c.nodeValue.length,b++;a=xe.DOMFix.childNodes(a)[b]}a||(a=this._document.body,d=0);return{elContainer:a,nOffset:d}},getXPathBookmark:function(){var a=-1,b={elContainer:this.startContainer,nOffset:this.startOffset},d=this.startContainer;3==d.nodeType&&(b=this._getFixedStartTextNode(),a=this._getPosIdx(b.elContainer),d=xe.DOMFix.parentNode(d));var a={sXPath:this._getXPath(d),nTextNodeIdx:a,nOffset:b.nOffset},b=-1,d={elContainer:this.endContainer,nOffset:this.endOffset},c=this.endContainer;
|
||||
b++;return b},_evaluateXPath:function(a,b){for(var a=a.substring(1,a.length-1),d=a.split(/\//),c=b.body,f=2;f<d.length&&c;f++){d[f].match(/([^\[]+)\[(\d+)/i);for(var g=RegExp.$1,h=RegExp.$2,c=xe.DOMFix.childNodes(c),k=[],j=c.length,n=0,m=0;m<j;m++)c[m].tagName==g&&(k[n++]=c[m]);c=k.length<h?null:k[h]}return c},_evaluateXPathBookmark:function(a){var b=a.nTextNodeIdx,d=a.nOffset,a=this._evaluateXPath(a.sXPath,this._document);if(-1<b&&a){for(var c=xe.DOMFix.childNodes(a),f=null;(f=c[b])&&3==f.nodeType&&
|
||||
f.nodeValue.length<d;)d-=f.nodeValue.length,b++;a=xe.DOMFix.childNodes(a)[b]}a||(a=this._document.body,d=0);return{elContainer:a,nOffset:d}},getXPathBookmark:function(){var a=-1,b={elContainer:this.startContainer,nOffset:this.startOffset},d=this.startContainer;3==d.nodeType&&(b=this._getFixedStartTextNode(),a=this._getPosIdx(b.elContainer),d=xe.DOMFix.parentNode(d));var a={sXPath:this._getXPath(d),nTextNodeIdx:a,nOffset:b.nOffset},b=-1,d={elContainer:this.endContainer,nOffset:this.endOffset},c=this.endContainer;
|
||||
3==c.nodeType&&(d=this._getFixedEndTextNode(),b=this._getPosIdx(d.elContainer),c=xe.DOMFix.parentNode(c));b={sXPath:this._getXPath(c),nTextNodeIdx:b,nOffset:d.nOffset};return[a,b]},moveToXPathBookmark:function(a){if(a){var b=this._evaluateXPathBookmark(a[0]),a=this._evaluateXPathBookmark(a[1]);b.elContainer&&a.elContainer&&(this.startContainer=b.elContainer,this.startOffset=b.nOffset,this.endContainer=a.elContainer,this.endOffset=a.nOffset)}},_getFixedTextContainer:function(a,b){for(;a&&3==a.nodeType&&
|
||||
a.previousSibling&&3==a.previousSibling.nodeType;)b+=a.previousSibling.nodeValue.length,a=a.previousSibling;return{elContainer:a,nOffset:b}},_getFixedStartTextNode:function(){return this._getFixedTextContainer(this.startContainer,this.startOffset)},_getFixedEndTextNode:function(){return this._getFixedTextContainer(this.endContainer,this.endOffset)},placeStringBookmark:function(){var a=(new Date).getTime(),b=this.cloneRange();b.collapseToEnd();var d=this._document.createElement("A");d.id=this.HUSKY_BOOMARK_END_ID_PREFIX+
|
||||
a;b.insertNode(d);b=this.cloneRange();b.collapseToStart();d=this._document.createElement("A");d.id=this.HUSKY_BOOMARK_START_ID_PREFIX+a;b.insertNode(d);this.moveToBookmark(a);return a},cloneRange:function(){return this._copyRange(new xe.XpressRange(this._window))},moveToBookmark:function(a){"object"!=typeof a?this.moveToStringBookmark(a):this.moveToXPathBookmark(a)},moveToStringBookmark:function(a){var b=this._document.getElementById(this.HUSKY_BOOMARK_START_ID_PREFIX+a),a=this._document.getElementById(this.HUSKY_BOOMARK_END_ID_PREFIX+
|
||||
|
|
@ -41,8 +41,8 @@ return tmpNode},getNodes:function(a,b){a&&this._splitTextEndNodesOfTheRange();va
|
|||
a),d=this.compareBoundaryPoints(this.START_TO_END,a),c=this.compareBoundaryPoints(this.END_TO_START,a),a=this.compareBoundaryPoints(this.END_TO_END,a);return 0>=b&&0<=a?!0:bIncludePartlyIncluded?1==d||-1==c?!1:!0:!1},isNodeInRange:function(a,b,d){var c=new xe.XpressRange(this._window);d&&a.firstChild?(c.setStartBefore(a.firstChild),c.setEndAfter(a.lastChild)):c.selectNode(a);return isRangeInRange(c,b)},pasteHTML:function(a){if(""==a)this.deleteContents();else{var b=this._document.createElement("DIV");
|
||||
b.innerHTML=a;for(var a=b.firstChild,d=b.lastChild,c=this.cloneRange(),f=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(f);c.deleteContents();c.removeStringBookmark(f)}},toString:function(){this.toString=xe.W3CDOMRange.prototype.toString;return this.toString()},toHTMLString:function(){var a=this._document.createElement("DIV");a.appendChild(this.cloneContents());return a.innerHTML},findAncestorByTagName:function(a){for(var b=this.commonAncestorContainer;b&&
|
||||
b.tagName!=a;)b=xe.DOMFix.parentNode(b);return b},selectNodeContents:function(a){if(a){var b=a.firstChild?a.firstChild:a,a=a.lastChild?a.lastChild:a;3==b.nodeType?this.setStart(b,0):this.setStartBefore(b);3==a.nodeType?this.setEnd(a,a.nodeValue.length):this.setEndAfter(a)}},styleRange:function(a,b,d){d=this._getStyleParentNodes(d);if(!(1>d.length)){for(var e,f,g=0;g<d.length;g++){for(var h in a)e=h,f=a[e],"string"==typeof f&&(d[g].style[e]=f);if(b)for(h in b)e=h,f=b[e],"string"==typeof f&&("class"==
|
||||
e?c(d[g]).addClass(f):d[g].setAttribute(e,f))}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();for(var b=this.getStartNode(),d=this.getEndNode(),e=this._getNodesInRange(),f=[],g=0,h,k,j,o,n,q=e.length,l=c(e).filter(function(){return!!this.childNodes.length}),m=0;m<q;m++)if((h=e[m])&&!(3!=h.nodeType||""==h.nodeValue)){n=xe.DOMFix.parentNode(h);if("SPAN"==n.tagName&&(k=this._getVeryFirstRealChild(n),j=k==h?1:"String"==typeof l?
|
||||
l.indexOf(k):l.html().indexOf(k),-1!=j&&(k=this._getVeryLastRealChild(n),o=k==h?1:"String"==typeof l?l.indexOf(k):l.html().indexOf(k)),-1!=j&&-1!=o)){f[g++]=n;continue}k=this._document.createElement("SPAN");n.insertBefore(k,h);k.appendChild(h);f[g++]=k;a&&k.setAttribute(a,"true")}this.setStartBefore(b);this.setEndAfter(d);return f},_getVeryFirstChild:function(a){return a.firstChild?this._getVeryFirstChild(a.firstChild):a},_getVeryLastChild:function(a){return a.lastChild?this._getVeryLastChild(a.lastChild):
|
||||
e?c(d[g]).addClass(f):d[g].setAttribute(e,f))}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();for(var b=this.getStartNode(),d=this.getEndNode(),e=this._getNodesInRange(),f=[],g=0,h,k,j,n,m,q=e.length,l=c(e).filter(function(){return!!this.childNodes.length}),o=0;o<q;o++)if((h=e[o])&&!(3!=h.nodeType||""==h.nodeValue)){m=xe.DOMFix.parentNode(h);if("SPAN"==m.tagName&&(k=this._getVeryFirstRealChild(m),j=k==h?1:"String"==typeof l?
|
||||
l.indexOf(k):l.html().indexOf(k),-1!=j&&(k=this._getVeryLastRealChild(m),n=k==h?1:"String"==typeof l?l.indexOf(k):l.html().indexOf(k)),-1!=j&&-1!=n)){f[g++]=m;continue}k=this._document.createElement("SPAN");m.insertBefore(k,h);k.appendChild(h);f[g++]=k;a&&k.setAttribute(a,"true")}this.setStartBefore(b);this.setEndAfter(d);return f},_getVeryFirstChild:function(a){return a.firstChild?this._getVeryFirstChild(a.firstChild):a},_getVeryLastChild:function(a){return a.lastChild?this._getVeryLastChild(a.lastChild):
|
||||
a},_getFirstRealChild:function(a){for(a=a.firstChild;a&&3==a.nodeType&&""==a.nodeValue;)a=a.nextSibling;return a},_getLastRealChild:function(a){for(a=a.lastChild;a&&3==a.nodeType&&""==a.nodeValue;)a=a.previousSibling;return a},_getVeryFirstRealChild:function(a){var b=this._getFirstRealChild(a);return b?this._getVeryFirstRealChild(b):a},_getVeryLastRealChild:function(a){var b=this._getLastRealChild(a);return b?this._getVeryLastChild(b):a},_getLineStartInfo:function(a){function b(a){a&&!c&&(k.test(a.tagName)?
|
||||
(g=a,c=f,h=!0):(f=a,d(a.previousSibling),c||b(xe.DOMFix.parentNode(a))))}function d(a){if(a&&!c)if(k.test(a.tagName))g=a,c=f,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.lastChild;b&&!c;)d(b),b=b.previousSibling;else f=a;c||d(a.previousSibling)}}var c=null,f=a,g=a,h=!0,k=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},_getLineEndInfo:function(a){function b(a){a&&!c&&(k.test(a.tagName)?(g=a,c=f,h=!0):(f=a,d(a.nextSibling),c||b(xe.DOMFix.parentNode(a))))}function d(a){if(a&&
|
||||
!c)if(k.test(a.tagName))g=a,c=f,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.firstChild;b&&!c;)d(b),b=b.nextSibling;else f=a;c||d(a.nextSibling)}}var c=null,f=a,g=a,h=!0,k=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},getLineInfo:function(){var a=this.getStartNode(),b=this.getEndNode();a||(a=this.getNodeAroundRange(!0,!0));b||(b=this.getNodeAroundRange(!0,!0));var a=this._getLineStartInfo(a),d=a.oNode,b=this._getLineEndInfo(b),c=b.oNode,d=this._compareEndPoint(xe.DOMFix.parentNode(d),
|
||||
|
|
@ -51,7 +51,7 @@ xe.SimpleSelectionImpl_FF.apply(this);this.selectRange=function(a){this.selectNo
|
|||
function(){this._oSelection.removeAllRanges()};this._FFRange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document);b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b};this._W3CRange2FFRange=function(a){var b=this._document.createRange();b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b}};xe.SimpleSelectionImpl_IE=function(){this._oSelection=this._document.selection;this.getRangeAt=function(a){a=a||0;if("Control"==
|
||||
this._oSelection.type){var b=new xe.W3CDOMRange(this._document),d=this._oSelection.createRange().item(a);if(!d||d.ownerDocument!=this._document)return b;b.selectNode(d);return b}d=this._oSelection.createRangeCollection().item(a).parentElement();return!d||d.ownerDocument!=this._document?b=new xe.W3CDOMRange(this._document):this._IERange2W3CRange(this._oSelection.createRangeCollection().item(a))};this.addRange=function(a){this._W3CRange2IERange(a).select()};this.selectNone=function(){this._oSelection.empty()};
|
||||
this._W3CRange2IERange=function(a){var b=this._getIERangeAt(a.startContainer,a.startOffset),a=this._getIERangeAt(a.endContainer,a.endOffset);b.setEndPoint("EndToEnd",a);return b};this._getIERangeAt=function(a,b){var d=this._document.body.createTextRange(),c=this._getSelectableNodeAndOffsetForIE(a,b),f=c.iOffsetForIE;d.moveToElementText(c.oSelectableNodeForIE);d.collapse(c.bCollapseToStart);d.moveStart("character",f);return d};this._getSelectableNodeAndOffsetForIE=function(a,b){var d=this._document.body.createTextRange(),
|
||||
c=null,f=null,g=0;3==a.nodeType?(c=xe.DOMFix.parentNode(a),f=xe.DOMFix.childNodes(c),g=f.length):(c=a,f=xe.DOMFix.childNodes(c),g=b);for(var h=null,k=0,j=!0,o=0;o<g;o++)if(h=f[o],3==h.nodeType){if(h==a)break;k+=h.nodeValue.length}else d.moveToElementText(h),c=h,k=0,j=!1;3==a.nodeType&&(k+=b);return{oSelectableNodeForIE:c,iOffsetForIE:k,bCollapseToStart:j}};this._IERange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document),d=null,d=null,d=a.duplicate();d.collapse(!0);d=this._getW3CContainerAndOffset(d,
|
||||
c=null,f=null,g=0;3==a.nodeType?(c=xe.DOMFix.parentNode(a),f=xe.DOMFix.childNodes(c),g=f.length):(c=a,f=xe.DOMFix.childNodes(c),g=b);for(var h=null,k=0,j=!0,n=0;n<g;n++)if(h=f[n],3==h.nodeType){if(h==a)break;k+=h.nodeValue.length}else d.moveToElementText(h),c=h,k=0,j=!1;3==a.nodeType&&(k+=b);return{oSelectableNodeForIE:c,iOffsetForIE:k,bCollapseToStart:j}};this._IERange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document),d=null,d=null,d=a.duplicate();d.collapse(!0);d=this._getW3CContainerAndOffset(d,
|
||||
!0);b.setStart(d.oContainer,d.iOffset);d=a.duplicate();d.collapse(!0);d.isEqual(a)?b.collapse(!0):(d=a.duplicate(),d.collapse(!1),d=this._getW3CContainerAndOffset(d),b.setEnd(d.oContainer,d.iOffset));return b};this._getW3CContainerAndOffset=function(a,b){for(var d=a.parentElement(),c=-1,f=this._document.body.createTextRange(),g=xe.DOMFix.childNodes(d),c=null,h=0,h=0;h<g.length;h++)if(3!=g[h].nodeType){f.moveToElementText(g[h]);if(0<=f.compareEndPoints("StartToStart",a))break;c=g[h]}if(0!=h&&3==g[h-
|
||||
1].nodeType){g=this._document.body.createTextRange();f=null;c?(g.moveToElementText(c),g.collapse(!1),f=c.nextSibling):(g.moveToElementText(d),g.collapse(!0),f=d.firstChild);d=a.duplicate();d.setEndPoint("StartToStart",g);for(c=d.text.length;c>f.nodeValue.length&&f.nextSibling;)c-=f.nodeValue.length,f=f.nextSibling;b&&f.nextSibling&&3==f.nextSibling.nodeType&&c==f.nodeValue.length&&(c-=f.nodeValue.length,f=f.nextSibling);d=f}else d=a.parentElement(),c=h;return{oContainer:d,iOffset:c}}};xe.DOMFix=new (c.Class({$init:function(){c.browser.msie||
|
||||
c.browser.opera?(this.childNodes=this._childNodes_Fix,this.parentNode=this._parentNode_Fix):(this.childNodes=this._childNodes_Native,this.parentNode=this._parentNode_Native)},_parentNode_Native:function(a){return a.parentNode},_parentNode_Fix:function(a){if(!a)return a;for(;a.previousSibling;)a=a.previousSibling;return a.parentNode},_childNodes_Native:function(a){return a.childNodes},_childNodes_Fix:function(a){var b=null,d=0;if(a){b=[];for(a=a.firstChild;a;)b[d++]=a,a=a.nextSibling}return b}}));
|
||||
|
|
@ -116,7 +116,7 @@ $ON_CHECK_STYLE_CHANGE:function(){this._getStyle()},$ON_RESET_STYLE_STATUS:funct
|
|||
_assignHTMLObjects:function(a){this.elFontNameSelect=c("SELECT.xpress_xeditor_ui_fontName_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontNameSelect,"change","SET_FONTNAME_FROM_SELECT_UI");this.elFontNameSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){"fontFamily"==a&&(this.elFontNameSelect.value=b.toLowerCase(),0>this.elFontNameSelect.selectedIndex&&(this.elFontNameSelect.selectedIndex=0))},$ON_SET_FONTNAME_FROM_SELECT_UI:function(){var a=this.elFontNameSelect.value;
|
||||
a&&(this.oApp.exec("SET_WYSIWYG_STYLE",[{fontFamily:a}]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_LineHeight=c.Class({name:"XE_LineHeight",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(){},$ON_SET_LINEHEIGHT:function(a){this.setLineHeight(a)},getLineHeight:function(){var a=this._getSelectedNodes(!1),b,d,e;if(0==a.length)return-1;var f=a.length;0==f?e=-1:(d=this._getLineWrapper(a[0]),e=this._getWrapperLineheight(d));var g=this.oSelection.getStartNode();if(0<e)for(var h=
|
||||
1;h<f;h++)if(!this._isChildOf(a[h],b)&&a[h]&&(b=this._getLineWrapper(a[h]),b!=d)){curHeight=this._getWrapperLineheight(b);if(curHeight!=e){e=-1;break}d=b}b=this._getLineWrapper(a[f-1]);a=this.oSelection.getEndNode();selectText=c.fnBind(function(a,b){this.oSelection.setEndNodes(a,b);this.oSelection.select()},this,g,a);setTimeout(selectText,100);return e},setLineHeight:function(a){function b(a,b){if(!a)try{a=thisRef.oSelection.surroundContentsWithNewNode("P")}catch(d){a=thisRef.oSelection.surroundContentsWithNewNode("DIV")}a.style.lineHeight=
|
||||
b;return a}function d(a){for(;a&&"BODY"!=a.tagName;)a=xe.DOMFix.parentNode(a);return!a?!1:!0}thisRef=this;var e=this._getSelectedNodes(!1);if(0!=e.length){var f,g,h=e.length;this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["LINEHEIGHT"]);g=this._getLineWrapper(e[0]);for(var k=g=b(g,a),j=1;j<h;j++){try{if(!d(xe.DOMFix.parentNode(e[j])))continue}catch(o){continue}this._isChildOf(e[j],f)||(f=this._getLineWrapper(e[j]),f!=g&&(g=f=b(f,a)))}setTimeout(c.fnBind(function(a,b){this.oSelection.setEndNodes(a,b);
|
||||
b;return a}function d(a){for(;a&&"BODY"!=a.tagName;)a=xe.DOMFix.parentNode(a);return!a?!1:!0}thisRef=this;var e=this._getSelectedNodes(!1);if(0!=e.length){var f,g,h=e.length;this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["LINEHEIGHT"]);g=this._getLineWrapper(e[0]);for(var k=g=b(g,a),j=1;j<h;j++){try{if(!d(xe.DOMFix.parentNode(e[j])))continue}catch(n){continue}this._isChildOf(e[j],f)||(f=this._getLineWrapper(e[j]),f!=g&&(g=f=b(f,a)))}setTimeout(c.fnBind(function(a,b){this.oSelection.setEndNodes(a,b);
|
||||
this.oSelection.select();this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["LINEHEIGHT"])},this,k,f||k),100)}},_getSelectedNodes:function(a){a||(this.oSelection=this.oApp.getSelection());this.oSelection.collapsed&&this.oSelection.selectNode(this.oSelection.commonAncestorContainer);a=this.oSelection.getTextNodes();if(0==a.length){var b=this.oSelection.getStartNode();b?a[0]=b:a=[]}return a},_getWrapperLineheight:function(a){var b="";if(a&&a.style.lineHeight)b=a.style.lineHeight;else for(a=this.oSelection.commonAncesterContainer;a&&
|
||||
!this.oSelection.rxLineBreaker.test(a.tagName);){if(a&&a.style.lineHeight){b=a.style.lineHeight;break}a=xe.DOMFix.parentNode(a)}return b},_isChildOf:function(a,b){for(;a&&"BODY"!=a.tagName;){if(a==b)return!0;a=xe.DOMFix.parentNode(a)}return!1},_getLineWrapper:function(a){var b=this.oApp.getEmptySelection();b.selectNode(a);var a=b.getLineInfo(),d=a.oStart,c=a.oEnd,f,b=null,a=d.oNode;f=d.oLineBreaker;d=c.oNode;c=c.oLineBreaker;this.oSelection.setEndNodes(a,d);f==c&&("P"==f.tagName||"DIV"==f.tagName?
|
||||
b=f:this.oSelection.setEndNodes(f.firstChild,f.lastChild));return b}});xe.XE_LineHeightWithSelectUI=c.Class({name:"XE_LineHeightWithSelectUI",_assignHTMLObjects:function(a){this.elLineHeightSelect=c("SELECT.xpress_xeditor_ui_lineHeight_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elLineHeightSelect,"change","SET_LINEHEIGHT_FROM_SELECT_UI");this.elLineHeightSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){"lineHeight"==a&&(this.elLineHeightSelect.value=
|
||||
|
|
@ -168,7 +168,9 @@ this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BGCOLOR_FROM_PALETTE",this.elDropdo
|
|||
[a]);this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[])},$ON_ST_SET_BGCOLOR:function(a){this.oBGColorInput.value=a;this.oButton_BGColorPreview.style.backgroundColor=a;this._showNewTable()},_showNewTable:function(){var a=document.createElement("DIV");a.innerHTML=this._getTableString();a=a.firstChild;this.oSampleTable.parentNode.insertBefore(a,this.oSampleTable);this.oSampleTable.parentNode.removeChild(this.oSampleTable);this.oSampleTable=a},_getTableString:function(){for(var a=this.oBorderColorInput.value,
|
||||
b=this.oBGColorInput.value,d=this.oBorderWidthInput.value,e="",e=c.browser.msie?"<td><p></p></td>":c.browser.firefox?"<td><p><br/></p></td>":"<td><p> </p></td>",b='<tr style="background:'+b+'">',f=this.oColumnInput.value,g=0;g<f;g++)b+=e;b+="</tr>\n";e=this.oRowInput.value;a='<table style="background:'+a+'" cellspacing="'+d+'"><tbody>';for(g=0;g<e;g++)a+=b;return a+"</tbody></table>"}});xe.XE_EditingModeToggler=c.Class({name:"XE_EditingModeToggler",$init:function(a){this._assignHTMLObjects(a)},
|
||||
_assignHTMLObjects:function(a){a=c.$(a)||document;this.elModeToggleButton=c("BUTTON.xpress_xeditor_mode_toggle_button",a).get(0);this.welModeToggleButton=c(this.elModeToggleButton)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elModeToggleButton,"click","EVENT_TOGGLE_EDITING_MODE",[])},$ON_EVENT_TOGGLE_EDITING_MODE:function(){"WYSIWYG"==this.oApp.getEditingMode()?this.oApp.exec("CHANGE_EDITING_MODE",["HTMLSrc"]):this.oApp.exec("CHANGE_EDITING_MODE",["WYSIWYG"])},$ON_CHANGE_EDITING_MODE:function(a){"HTMLSrc"==
|
||||
a?(this.welModeToggleButton.addClass("active").parent("span").addClass("active"),this.oApp.exec("DISABLE_ALL_UI",[])):(this.welModeToggleButton.removeClass("active").parent("span").removeClass("active"),this.oApp.exec("ENABLE_ALL_UI",[]))}});xe.XpressCore.oMessageMap={"XE_EditingAreaManager.onExit":"%uB0B4%uC6A9%uC774%20%uBCC0%uACBD%uB418%uC5C8%uC2B5%uB2C8%uB2E4.","XE_FontColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff",
|
||||
a?(this.welModeToggleButton.addClass("active").parent("span").addClass("active"),this.oApp.exec("DISABLE_ALL_UI",[])):(this.welModeToggleButton.removeClass("active").parent("span").removeClass("active"),this.oApp.exec("ENABLE_ALL_UI",[]))}});xe.XE_Editorresize=c.Class({name:"XE_Editorresize",$init:function(a,b){this.inputArea=c(".xpress_xeditor_editing_area_container",a).get(0);this.oVerticalResizer=c(".xpress_xeditor_editingArea_verticalResizer",a).get(0);this.oCheckBox=c("#editorresize",a).get(0);
|
||||
this.oIframe=b;var d=this;c(b).load(function(){d.oIframeBody=c(b).contents().find("body")})},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.oCheckBox,"change","XE_TOGGLE_EDITOR_RESIZE")},$ON_XE_TOGGLE_EDITOR_RESIZE:function(){!0==this.oCheckBox.checked?(void 0==this._prevHeight&&(this._prevHeight=this.inputArea.style.height),this.oVerticalResizer.style.display="none",this.oApp.registerBrowserEvent(this.oIframeBody,"keydown","XE_EDITOR_RESIZE"),this.inputArea.style.height=this.oIframe.style.height=
|
||||
this.oIframeBody[0].scrollHeight+"px"):(c(this.oIframeBody).unbind("keydown"),this.oVerticalResizer.style.display="block",this.inputArea.style.height=this._prevHeight,this.oIframe.style.height=this._prevHeight)},$ON_XE_EDITOR_RESIZE:function(){this.inputArea.style.height=this.oIframe.style.height=this.oIframeBody[0].scrollHeight+"px"}});xe.XpressCore.oMessageMap={"XE_EditingAreaManager.onExit":"%uB0B4%uC6A9%uC774%20%uBCC0%uACBD%uB418%uC5C8%uC2B5%uB2C8%uB2E4.","XE_FontColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff",
|
||||
"XE_BGColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff","XE_Hyperlink.invalidURL":"%uC785%uB825%uD558%uC2E0%20URL%uC774%20%uC62C%uBC14%uB974%uC9C0%20%uC54A%uC2B5%uB2C8%uB2E4."};regex_handler=/<(.*?)\s+on[a-z]+\s*=(?:\s*".*?"|\s*'.*?'|[^\s>]+)(.*?)>/ig;regex_font_color=/color\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;
|
||||
regex_font_face=/face\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_size=/size\s*=(?:\s*"(\d+)"|\s*'(\d+)'|(\d+))/i;regex_style=/style\s*=\s*(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_weight=/font-weight\s*:\s*([a-z]+);?/i;regex_font_style=/font-style\s*:\s*italic;?/i;regex_font_decoration=/text-decoration\s*:\s*([a-z -]+);?/i;regex_jquery=/jQuery\d+\s*=(\s*"\d+"|\d+)/ig;regex_quote_attr=/([\w-]+\s*=(?:\s*"[^"]+"|\s*'[^']+'))|([\w-]+)=([^\s]+)/g;var p="area,br,col,embed,hr,img,input,param".split(",");
|
||||
xe.XE_XHTMLFormatter=c.Class({name:"XE_XHTMLFormatter",$ON_MSG_APP_READY:function(){this.oApp.addConverter("WYSIWYG_TO_IR",this.TO_IR);this.oApp.addConverter("HTMLSrc_TO_IR",this.TO_IR);this.oApp.addConverter("IR_TO_HTMLSrc",this.IR_TO);this.oApp.addConverter("IR_TO_WYSIWYG",this.IR_TO)},TO_IR:function(a){var b=[];c.browser.msie&&(a=a.replace(regex_jquery,""),a=a.replace(/<(\w+) ([^>]+)>/g,function(a,b,c){return"<"+b+" "+c.replace(regex_quote_attr,function(a,b,c,d){return b?b:/^"/.test(d)||/"$/.test(d)?
|
||||
|
|
@ -182,26 +184,26 @@ $ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFormatSelect,
|
|||
a.toLowerCase()&&(this.elFormatSelect.selectedIndex=0)},$ON_SET_FORMAT_FROM_SELECT_UI:function(){var a=this.elFormatSelect.value;a&&(c.browser.msie&&(a="<"+a+">"),this.oApp.exec("EXECCOMMAND",["FormatBlock",!1,a]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_Table=c.Class({_startSel:null,_endSel:null,$ON_MSG_APP_READY:function(){this._doc=c(this.oApp.getWYSIWYGDocument());this.$FnMouseDown=c.fnBind(this._mousedown,this);this.$FnMouseUp=c.fnBind(this._mouseup,this);this.$FnMouseMove=c.fnBind(this._mousemove,
|
||||
this);this._doc.mousedown(this.$FnMouseDown);this._endSel=this._startSel=null;this.oApp.exec("REGISTER_UI_EVENT",["merge_cells","click","MERGE_CELLS"]);this.oApp.exec("REGISTER_UI_EVENT",["split_col","click","CELL_SPLIT_BY_COL"]);this.oApp.exec("REGISTER_UI_EVENT",["split_row","click","CELL_SPLIT_BY_ROW"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+alt+m","MERGE_CELLS"]);this.$super.$ON_MSG_APP_READY()},$ON_MERGE_CELLS:function(){var a="",b=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),
|
||||
d=this;if(b.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Merge"]);b.each(function(){a+=c(this).html()}).eq(0).html(a);var e=0;b.eq(0).nextAll("td,th").andSelf().filter(".xe_selected_cell").each(function(){e+=d._getSpan(this,"col")});this._getRect(b.eq(0));var f=b.eq(0).parent("tr"),g=b.eq(b.length-1).parent("tr"),h=b.parents("table").eq(0).find("tr"),f=h.index(g.get(0))-h.index(f.get(0))+this._getSpan(b.eq(b.length-1),"row");b.eq(0).attr("colSpan",e).attr("rowSpan",f);b.slice(1).remove()}},
|
||||
$ON_CELL_SPLIT_BY_ROW:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").eq(0),d=this;if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Row"]);var e=this._getRect(a.eq(0)).top,f=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=e||a.top>=f)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=b.parent("tr"),f=d._getSpan(b,"row"),j=d._getRect(b),l=
|
||||
[],n=b.clone().html("<br />"),m=1,p=1;1<f?(m=Math.ceil(f/2),p=f-m,l.push(function(){b.attr("rowSpan",m)}),n.attr("rowSpan",p)):(a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.bottom<=j.top||a.top>=j.bottom?!1:!0}).each(function(){var a=c(this),b=d._getSpan(a,"row")+1;l.push(function(){a.attr("rowSpan",b)})}),c.browser.msie?e.after(e.clone().empty().get(0).outerHTML):e.after(e.clone().empty()));f=e.nextAll("tr");f.length?(e=f.eq(m-1).children("td,th").filter(function(){return d._getRect(c(this)).left>
|
||||
j.left}),c.browser.msie?e.length?e.eq(0).before(n.get(0).outerHTML):f.eq(m-1).append(n.get(0).outerHTML):e.length?e.slice(0,1).before(n):f.slice(m-1,1).append(n)):e.after(e.clone().empty().append(n));c.each(l,function(){this()})})}},$ON_CELL_SPLIT_BY_COL:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").slice(0,1),d=this;(new Date).getTime();if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Column"]);var e=a.eq(0).parent("tr"),
|
||||
f=this._getRect(e.find(".xe_selected_cell:first")).left,g=this._getRect(e.find(".xe_selected_cell:last")).right;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=f||a.left>=g)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=d._getSpan(b,"col"),f=b.clone().html("<br />");if(1<e){var g=Math.ceil(e/2),e=e-g;b.attr("colSpan",g);f.attr("colSpan",e)}else{var n=d._getRect(b);a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.right<=
|
||||
n.left||a.left>=n.right?!1:!0}).each(function(){var a=c(this);a.attr("colSpan",d._getSpan(a,"col")+1)});f.attr("colSpan",1)}c.browser.msie?b.after(f.get(0).outerHTML):b.after(f)})}},$ON_CHECK_STYLE_CHANGE:function(){var a=this.oApp,b=this._startSel&&this._startSel.is(".xe_selected_cell")?"ENABLE_UI":"DISABLE_UI";c.each(["merge_cells","split_col","split_row"],function(){a.exec(b,[this])})},_mousedown:function(a){var b=c(a.target).parents().andSelf().filter("td,th,table"),d=this.oApp,e=this;c("td.xe_selected_cell",
|
||||
$ON_CELL_SPLIT_BY_ROW:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").eq(0),d=this;if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Row"]);var e=this._getRect(a.eq(0)).top,f=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=e||a.top>=f)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=b.parent("tr"),f=d._getSpan(b,"row"),j=d._getRect(b),n=
|
||||
[],m=b.clone().html("<br />"),l=1,o=1;1<f?(l=Math.ceil(f/2),o=f-l,n.push(function(){b.attr("rowSpan",l)}),m.attr("rowSpan",o)):(a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.bottom<=j.top||a.top>=j.bottom?!1:!0}).each(function(){var a=c(this),b=d._getSpan(a,"row")+1;n.push(function(){a.attr("rowSpan",b)})}),c.browser.msie?e.after(e.clone().empty().get(0).outerHTML):e.after(e.clone().empty()));f=e.nextAll("tr");f.length?(e=f.eq(l-1).children("td,th").filter(function(){return d._getRect(c(this)).left>
|
||||
j.left}),c.browser.msie?e.length?e.eq(0).before(m.get(0).outerHTML):f.eq(l-1).append(m.get(0).outerHTML):e.length?e.slice(0,1).before(m):f.slice(l-1,1).append(m)):e.after(e.clone().empty().append(m));c.each(n,function(){this()})})}},$ON_CELL_SPLIT_BY_COL:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").slice(0,1),d=this;(new Date).getTime();if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Column"]);var e=a.eq(0).parent("tr"),
|
||||
f=this._getRect(e.find(".xe_selected_cell:first")).left,g=this._getRect(e.find(".xe_selected_cell:last")).right;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=f||a.left>=g)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=d._getSpan(b,"col"),f=b.clone().html("<br />");if(1<e){var g=Math.ceil(e/2),e=e-g;b.attr("colSpan",g);f.attr("colSpan",e)}else{var m=d._getRect(b);a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.right<=
|
||||
m.left||a.left>=m.right?!1:!0}).each(function(){var a=c(this);a.attr("colSpan",d._getSpan(a,"col")+1)});f.attr("colSpan",1)}c.browser.msie?b.after(f.get(0).outerHTML):b.after(f)})}},$ON_CHECK_STYLE_CHANGE:function(){var a=this.oApp,b=this._startSel&&this._startSel.is(".xe_selected_cell")?"ENABLE_UI":"DISABLE_UI";c.each(["merge_cells","split_col","split_row"],function(){a.exec(b,[this])})},_mousedown:function(a){var b=c(a.target).parents().andSelf().filter("td,th,table"),d=this.oApp,e=this;c("td.xe_selected_cell",
|
||||
this.oApp.getWYSIWYGDocument()).removeClass("xe_selected_cell");this._endSel=this._startSel=null;b.length&&this._isLeftClicked(a.button)&&setTimeout(function(){b=d.getSelection().cloneRange();b.collapseToStart();b=c(b.startContainer).parents().andSelf().filter("td,th").eq(0);if(!b.length)return e._removeAllListener()||!0;e._getRect(e._startSel=b);e._doc.bind("mousemove",e.$FnMouseMove);e._doc.bind("mouseup",e.$FnMouseUp)},0)},_mouseup:function(){this._removeAllListener();this._startSel=this._endSel=
|
||||
null},_mousemove:function(a){var b=c(a.target).parents().andSelf().filter("td,th").eq(0),d=this;if(!(!b.length||!this._isLeftClicked(a.button)||!this._endSel&&b.get(0)==this._startSel.get(0))&&!(this._endSel&&b.get(0)==this._endSel.get(0))){this._getRect(this._endSel=b);var e=Math.min(this._startSel.rect.top,this._endSel.rect.top),f=Math.min(this._startSel.rect.left,this._endSel.rect.left),g=Math.max(this._startSel.rect.bottom,this._endSel.rect.bottom),h=Math.max(this._startSel.rect.right,this._endSel.rect.right),
|
||||
a=b.parents("table").find("td,th").removeClass("xe_selected_cell"),b=c();do b.each(function(){var a=d._getRect(c(this));a.right>h&&(h=a.right);a.left<f&&(f=a.left);a.top<e&&(e=a.top);a.bottom>g&&(g=a.bottom)}),a=a.filter(":not(.xe_selected_cell)"),b=a.filter(function(){var a=d._getRect(c(this));return a.right<=f||a.left>=h||a.bottom<=e||a.top>=g?!1:!0}).addClass("xe_selected_cell");while(b.length);c.browser.mozilla||setTimeout(function(){var a=d.oApp.getSelection();d._startSel&&(d._startSel.get(0).firstChild||
|
||||
d._startSel.text(" "),a.selectNode(d._startSel.get(0).firstChild),a.collapseToStart(),a.select())},0);return!1}},_removeAllListener:function(){this._doc.unbind("mousemove",this.$FnMouseMove);this._doc.unbind("mouseup",this.$FnMouseUp)},_isLeftClicked:function(a){return c.browser.msie?!!(a&1):0==a},_getRect:function(a){var b=a.get(0);a.rect={};a.rect.top=b.offsetTop;a.rect.left=b.offsetLeft;a.rect.bottom=a.rect.top+b.offsetHeight;a.rect.right=a.rect.left+b.offsetWidth;return a.rect},_getSpan:function(a,
|
||||
b){var d=parseInt(c(a).attr(b+"span"));return isNaN(d)?1:d}}).extend(xe.XE_Table)})(jQuery);window.xe||(xe={});xe.Editors=[];
|
||||
function editorStart_xe(c,m,l,p,a,b,d,e){function f(){try{var a=o.contentWindow.document;if("about:blank"==a.location)throw"blank";j.registerPlugin(new xe.XE_EditingArea_WYSIWYG(o));j.registerPlugin(new xe.XpressRangeManager(o));j.registerPlugin(new xe.XE_ExecCommand(o));d&&!a.body.style.fontFamily&&(a.body.style.fontFamily=d);e&&!a.body.style.fontSize&&(a.body.style.fontSize=e);j.run()}catch(b){setTimeout(f,0)}}"undefined"==typeof a&&(a="white");"undefined"==typeof b&&(b="xeStyle");"undefined"==
|
||||
function editorStart_xe(c,o,l,p,a,b,d,e){function f(){try{var a=n.contentWindow.document;if("about:blank"==a.location)throw"blank";j.registerPlugin(new xe.XE_EditingArea_WYSIWYG(n));j.registerPlugin(new xe.XpressRangeManager(n));j.registerPlugin(new xe.XE_ExecCommand(n));d&&!a.body.style.fontFamily&&(a.body.style.fontFamily=d);e&&!a.body.style.fontSize&&(a.body.style.fontSize=e);j.run()}catch(b){setTimeout(f,0)}}"undefined"==typeof a&&(a="white");"undefined"==typeof b&&(b="xeStyle");"undefined"==
|
||||
typeof d&&(d="");"undefined"==typeof e&&(e="");var g=request_uri+"modules/editor/styles/"+b+"/editor.html",b=jQuery("#xpress-editor-"+c),g=jQuery('<iframe id="editor_iframe_'+c+'" allowTransparency="true" frameborder="0" src="'+g+'" scrolling="yes" style="width:100%;height:'+p+'px">'),h=jQuery('<textarea rows="8" cols="42" class="input_syntax '+a+'" style="display:none"></textarea>'),a=b.get(0).form;a.setAttribute("editor_sequence",c);b.css("display","none");var k="";0<jQuery("input[name=content]",
|
||||
a).size()&&(k=jQuery("input[name=content]",a).val().replace(/src=\"files\/attach/g,'src="'+request_uri+"files/attach"),jQuery("#xpress-editor-"+c).val(k));b.hide().css("width","100%").before(g).after(h);var j=new xe.XpressCore,o=g.get(0),b=b.get(0),g=h.get(0),h=jQuery(".xpress-editor",a).get(0);j.getFrame=function(){return o};j.getContent=function(){editorGetContentTextarea_xe(c)};k=a[l].value;xFF&&!k&&(k="<br />");k=editorReplacePath(k);a[l].value=k;jQuery("#xpress-editor-"+c).val(k);editorRelKeys[c]=
|
||||
[];editorRelKeys[c].primary=a[m];editorRelKeys[c].content=a[l];editorRelKeys[c].func=editorGetContentTextarea_xe;editorRelKeys[c].editor=j;editorRelKeys[c].pasteHTML=function(a){j.exec("PASTE_HTML",[a])};xe.Editors[c]=j;j.registerPlugin(new xe.CorePlugin(null));j.registerPlugin(new xe.XE_PreservTemplate(jQuery("#xpress-editor-"+c).val()));j.registerPlugin(new xe.StringConverterManager);j.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG",b,{nHeight:parseInt(p),nMinHeight:205},null,h));j.registerPlugin(new xe.XE_EditingArea_HTMLSrc(g));
|
||||
a).size()&&(k=jQuery("input[name=content]",a).val().replace(/src=\"files\/attach/g,'src="'+request_uri+"files/attach"),jQuery("#xpress-editor-"+c).val(k));b.hide().css("width","100%").before(g).after(h);var j=new xe.XpressCore,n=g.get(0),b=b.get(0),g=h.get(0),h=jQuery(".xpress-editor",a).get(0);j.getFrame=function(){return n};j.getContent=function(){editorGetContentTextarea_xe(c)};k=a[l].value;xFF&&!k&&(k="<br />");k=editorReplacePath(k);a[l].value=k;jQuery("#xpress-editor-"+c).val(k);editorRelKeys[c]=
|
||||
[];editorRelKeys[c].primary=a[o];editorRelKeys[c].content=a[l];editorRelKeys[c].func=editorGetContentTextarea_xe;editorRelKeys[c].editor=j;editorRelKeys[c].pasteHTML=function(a){j.exec("PASTE_HTML",[a])};xe.Editors[c]=j;j.registerPlugin(new xe.CorePlugin(null));j.registerPlugin(new xe.XE_PreservTemplate(jQuery("#xpress-editor-"+c).val()));j.registerPlugin(new xe.StringConverterManager);j.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG",b,{nHeight:parseInt(p),nMinHeight:205},null,h));j.registerPlugin(new xe.XE_EditingArea_HTMLSrc(g));
|
||||
j.registerPlugin(new xe.XE_EditingAreaVerticalResizer(h));j.registerPlugin(new xe.Utils);j.registerPlugin(new xe.DialogLayerManager);j.registerPlugin(new xe.ActiveLayerManager);j.registerPlugin(new xe.Hotkey);j.registerPlugin(new xe.XE_WYSIWYGStyler);j.registerPlugin(new xe.XE_WYSIWYGStyleGetter);j.registerPlugin(new xe.MessageManager(xe.XpressCore.oMessageMap));j.registerPlugin(new xe.XE_Toolbar(h));j.registerPlugin(new xe.XE_XHTMLFormatter);j.registerPlugin(new xe.XE_GET_WYSYWYG_MODE(c));jQuery("ul.extra1").length&&
|
||||
(j.registerPlugin(new xe.XE_ColorPalette(h)),j.registerPlugin(new xe.XE_FontColor(h)),j.registerPlugin(new xe.XE_BGColor(h)),j.registerPlugin(new xe.XE_Quote(h)),j.registerPlugin(new xe.XE_FontNameWithSelectUI(h)),j.registerPlugin(new xe.XE_FontSizeWithSelectUI(h)),j.registerPlugin(new xe.XE_LineHeightWithSelectUI(h)),j.registerPlugin(new xe.XE_UndoRedo),j.registerPlugin(new xe.XE_Table(h)),j.registerPlugin(new xe.XE_Hyperlink(h)),j.registerPlugin(new xe.XE_FormatWithSelectUI(h)),j.registerPlugin(new xe.XE_SCharacter(h)));
|
||||
jQuery("ul.extra2").length&&j.registerPlugin(new xe.XE_Extension(h,c));jQuery("ul.extra3").length&&j.registerPlugin(new xe.XE_EditingModeToggler(h));!jQuery.browser.msie&&!jQuery.browser.opera&&j.registerPlugin(new xe.XE_WYSIWYGEnterKey(o));(s=a._saved_doc_title)&&j.registerPlugin(new xe.XE_AutoSave(b,h));f();return j}
|
||||
function editorGetContentTextarea_xe(c){c=xe.Editors[c]||null;if(!c)return"";c=c.getIR();if(!jQuery.trim(c.replace(/( |<\/?(p|br|span|div)([^>]+)?>)/ig,"")))return"";c=c.replace(/<br ?\/?>$/i,"");if(1024>c.length){var m="#text,A,BR,IMG,EM,STRONG,SPAN,BIG,CITE,CODE,DD,DFN,HR,INS,KBD,LINK,Q,SAMP,SMALL,SUB,SUP,TT".split(","),l=!0,p=jQuery("<div>"+c+"</div>").eq(0).contents();jQuery.each(p,function(){3!=this.nodeType&&-1==jQuery.inArray(this.nodeName,m)&&(l=!1)});l&&(c="<p>"+c+"</p>")}c=c.replace(/src\s?=\s?(["']?)(?:\.\.\/)+(files\/attach\/)/ig,
|
||||
function(a,b,c){return"src="+(b||"")+c});c=c.replace(/\<(\/)?([A-Z]+)([^>]*)\>/ig,function(a,b,c,e){e=e?e.replace(/ ([A-Z]+?)\=/ig,function(a,b){b=b.toLowerCase();return" "+b+"="}):"";c=c.toLowerCase();b||(b="");return"<"+b+c+e+">"});return c=c.replace("<br>","<br />")}function editorGetIframe(c){return jQuery("iframe#editor_iframe_"+c).get(0)}function editorReplaceHTML(c,m){var m=editorReplacePath(m),l=parseInt(c.id.replace(/^.*_/,""),10);editorRelKeys[l].pasteHTML(m)}
|
||||
jQuery("ul.extra2").length&&j.registerPlugin(new xe.XE_Extension(h,c));jQuery("ul.extra3").length&&j.registerPlugin(new xe.XE_EditingModeToggler(h));jQuery("#editorresize").length&&j.registerPlugin(new xe.XE_Editorresize(h,n));!jQuery.browser.msie&&!jQuery.browser.opera&&j.registerPlugin(new xe.XE_WYSIWYGEnterKey(n));(s=a._saved_doc_title)&&j.registerPlugin(new xe.XE_AutoSave(b,h));f();return j}
|
||||
function editorGetContentTextarea_xe(c){c=xe.Editors[c]||null;if(!c)return"";c=c.getIR();if(!jQuery.trim(c.replace(/( |<\/?(p|br|span|div)([^>]+)?>)/ig,"")))return"";c=c.replace(/<br ?\/?>$/i,"");if(1024>c.length){var o="#text,A,BR,IMG,EM,STRONG,SPAN,BIG,CITE,CODE,DD,DFN,HR,INS,KBD,LINK,Q,SAMP,SMALL,SUB,SUP,TT".split(","),l=!0,p=jQuery("<div>"+c+"</div>").eq(0).contents();jQuery.each(p,function(){3!=this.nodeType&&-1==jQuery.inArray(this.nodeName,o)&&(l=!1)});l&&(c="<p>"+c+"</p>")}c=c.replace(/src\s?=\s?(["']?)(?:\.\.\/)+(files\/attach\/)/ig,
|
||||
function(a,b,c){return"src="+(b||"")+c});c=c.replace(/\<(\/)?([A-Z]+)([^>]*)\>/ig,function(a,b,c,e){e=e?e.replace(/ ([A-Z]+?)\=/ig,function(a,b){b=b.toLowerCase();return" "+b+"="}):"";c=c.toLowerCase();b||(b="");return"<"+b+c+e+">"});return c=c.replace("<br>","<br />")}function editorGetIframe(c){return jQuery("iframe#editor_iframe_"+c).get(0)}function editorReplaceHTML(c,o){var o=editorReplacePath(o),l=parseInt(c.id.replace(/^.*_/,""),10);editorRelKeys[l].pasteHTML(o)}
|
||||
function editorReplacePath(c){return c=c.replace(/\<([^\>\<]*)(src=|href=|url\()("|\')*([^"\'\)]+)("|\'|\))*(\s|>)*/ig,function(c,l,p,a,b,d,e){"url("==p?(a="",d=")"):("undefined"==typeof a&&(a='"'),"undefined"==typeof d&&(d='"'),"undefined"==typeof e&&(e=""));b=jQuery.trim(b).replace(/^\.\//,"");return/^(http\:|https\:|ftp\:|telnet\:|mms\:|mailto\:|\/|\.\.|\#)/i.test(b)?c:"<"+l+p+a+request_uri+b+d+e})}
|
||||
function editorGetAutoSavedDoc(c){var m=[];m.mid=current_mid;m.editor_sequence=c.getAttribute("editor_sequence");setTimeout(function(){exec_xml("editor","procEditorLoadSavedDocument",m,function(c){editorRelKeys[m.editor_sequence].primary.value=c.document_srl;"object"==typeof uploadSettingObj[m.editor_sequence]&&editorUploadInit(uploadSettingObj[m.editor_sequence],!0)},"error,message,editor_sequence,title,content,document_srl".split(","))},0)}
|
||||
function editorGetAutoSavedDoc(c){var o=[];o.mid=current_mid;o.editor_sequence=c.getAttribute("editor_sequence");setTimeout(function(){exec_xml("editor","procEditorLoadSavedDocument",o,function(c){editorRelKeys[o.editor_sequence].primary.value=c.document_srl;"object"==typeof uploadSettingObj[o.editor_sequence]&&editorUploadInit(uploadSettingObj[o.editor_sequence],!0)},"error,message,editor_sequence,title,content,document_srl".split(","))},0)}
|
||||
xe.XE_GET_WYSYWYG_MODE=jQuery.Class({name:"XE_GET_WYSYWYG_MODE",$init:function(c){this.editor_sequence=c},$ON_CHANGE_EDITING_MODE:function(c){editorMode[this.editor_sequence]="HTMLSrc"==c?"html":"wysiwyg"}});xe.XE_PreservTemplate=jQuery.Class({name:"XE_PreservTemplate",isRun:!1,$BEFORE_SET_IR:function(c){if(!this.isRun&&!c)return this.isRun=!0,!1}});
|
||||
xe.XE_Preview=jQuery.Class({name:"XE_Preview",elPreviewButton:null,$init:function(c){this._assignHTMLObjects(c)},_assignHTMLObjects:function(c){this.elPreviewButton=jQuery("BUTTON.xpress_xeditor_preview_button",c)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elPreviewButton.get(0),"click","EVENT_PREVIEW",[])},$ON_EVENT_PREVIEW:function(){}});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue