스마트에디터 2.9.0 버전으로 수정

This commit is contained in:
thisgun
2017-07-03 10:06:52 +09:00
parent 7f6b5d1b58
commit 0575cdab18
63 changed files with 30108 additions and 21953 deletions

View File

@ -0,0 +1,151 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if(typeof window.nhn=='undefined') window.nhn = {};
if (!nhn.husky) nhn.husky = {};
/**
* @fileOverview This file contains application creation helper function, which would load up an HTML(Skin) file and then execute a specified create function.
* @name HuskyEZCreator.js
*/
nhn.husky.EZCreator = new (function(){
this.nBlockerCount = 0;
this.createInIFrame = function(htOptions){
if(arguments.length == 1){
var oAppRef = htOptions.oAppRef;
var elPlaceHolder = htOptions.elPlaceHolder;
var sSkinURI = htOptions.sSkinURI;
var fCreator = htOptions.fCreator;
var fOnAppLoad = htOptions.fOnAppLoad;
var bUseBlocker = htOptions.bUseBlocker;
var htParams = htOptions.htParams || null;
}else{
// for backward compatibility only
var oAppRef = arguments[0];
var elPlaceHolder = arguments[1];
var sSkinURI = arguments[2];
var fCreator = arguments[3];
var fOnAppLoad = arguments[4];
var bUseBlocker = arguments[5];
var htParams = arguments[6];
}
if(bUseBlocker) nhn.husky.EZCreator.showBlocker();
var attachEvent = function(elNode, sEvent, fHandler){
if(elNode.addEventListener){
elNode.addEventListener(sEvent, fHandler, false);
}else{
elNode.attachEvent("on"+sEvent, fHandler);
}
}
if(!elPlaceHolder){
alert("Placeholder is required!");
return;
}
if(typeof(elPlaceHolder) != "object")
elPlaceHolder = document.getElementById(elPlaceHolder);
var elIFrame, nEditorWidth, nEditorHeight;
try{
elIFrame = document.createElement("<IFRAME frameborder=0 scrolling=no>");
}catch(e){
elIFrame = document.createElement("IFRAME");
elIFrame.setAttribute("frameborder", "0");
elIFrame.setAttribute("scrolling", "no");
}
elIFrame.style.width = "1px";
elIFrame.style.height = "1px";
elPlaceHolder.parentNode.insertBefore(elIFrame, elPlaceHolder.nextSibling);
attachEvent(elIFrame, "load", function(){
fCreator = elIFrame.contentWindow[fCreator] || elIFrame.contentWindow.createSEditor2;
// top.document.title = ((new Date())-window.STime);
// window.STime = new Date();
try{
nEditorWidth = elIFrame.contentWindow.document.body.scrollWidth || "500px";
nEditorHeight = elIFrame.contentWindow.document.body.scrollHeight + 12;
elIFrame.style.width = "100%";
elIFrame.style.height = nEditorHeight+ "px";
elIFrame.contentWindow.document.body.style.margin = "0";
}catch(e){
nhn.husky.EZCreator.hideBlocker(true);
elIFrame.style.border = "5px solid red";
elIFrame.style.width = "500px";
elIFrame.style.height = "500px";
alert("Failed to access "+sSkinURI);
return;
}
var oApp = fCreator(elPlaceHolder, htParams); // oEditor
oApp.elPlaceHolder = elPlaceHolder;
oAppRef[oAppRef.length] = oApp;
if(!oAppRef.getById) oAppRef.getById = {};
if(elPlaceHolder.id) oAppRef.getById[elPlaceHolder.id] = oApp;
oApp.run({fnOnAppReady:fOnAppLoad});
// top.document.title += ", "+((new Date())-window.STime);
nhn.husky.EZCreator.hideBlocker();
});
// window.STime = new Date();
elIFrame.src = sSkinURI;
this.elIFrame = elIFrame;
};
this.showBlocker = function(){
if(this.nBlockerCount<1){
var elBlocker = document.createElement("DIV");
elBlocker.style.position = "absolute";
elBlocker.style.top = 0;
elBlocker.style.left = 0;
elBlocker.style.backgroundColor = "#FFFFFF";
elBlocker.style.width = "100%";
document.body.appendChild(elBlocker);
nhn.husky.EZCreator.elBlocker = elBlocker;
}
nhn.husky.EZCreator.elBlocker.style.height = Math.max(document.body.scrollHeight, document.body.clientHeight)+"px";
this.nBlockerCount++;
};
this.hideBlocker = function(bForce){
if(!bForce){
if(--this.nBlockerCount > 0) return;
}
this.nBlockerCount = 0;
if(nhn.husky.EZCreator.elBlocker) nhn.husky.EZCreator.elBlocker.style.display = "none";
}
})();

View File

@ -0,0 +1,126 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
function createSEditor2(elIRField, htParams, elSeAppContainer){
if(!window.$Jindo){
parent.document.body.innerHTML="진도 프레임웍이 필요합니다.<br>\n<a href='http://dev.naver.com/projects/jindo/download'>http://dev.naver.com/projects/jindo/download</a>에서 Jindo 1.5.3 버전의 jindo.min.js를 다운로드 받아 /js 폴더에 복사 해 주세요.\n(아직 Jindo 2 는 지원하지 않습니다.)";
return;
}
var elAppContainer = (elSeAppContainer || jindo.$("smart_editor2"));
var elEditingArea = jindo.$$.getSingle("DIV.husky_seditor_editing_area_container", elAppContainer);
var oWYSIWYGIFrame = jindo.$$.getSingle("IFRAME.se2_input_wysiwyg", elEditingArea);
var oIRTextarea = elIRField?elIRField:jindo.$$.getSingle("TEXTAREA.blind", elEditingArea);
var oHTMLSrc = jindo.$$.getSingle("TEXTAREA.se2_input_htmlsrc", elEditingArea);
var oTextArea = jindo.$$.getSingle("TEXTAREA.se2_input_text", elEditingArea);
if(!htParams){
htParams = {};
htParams.fOnBeforeUnload = null;
}
htParams.elAppContainer = elAppContainer; // 에디터 UI 최상위 element 셋팅
htParams.oNavigator = jindo.$Agent().navigator(); // navigator 객체 셋팅
htParams.I18N_LOCALE = htParams.I18N_LOCALE || "ko_KR";
var oEditor = new nhn.husky.HuskyCore(htParams);
oEditor.registerPlugin(new nhn.husky.CorePlugin(htParams?htParams.fOnAppLoad:null));
oEditor.registerPlugin(new nhn.husky.StringConverterManager());
if(htParams.bSkipXssFilter !== true){
// 보안 필터링 플러그인 (TODO:소스분리 및 블랙리스트 옵션 추가)
oEditor.registerPlugin({
_rxFilter:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*?>/gi,
$ON_REGISTER_CONVERTERS : function() {
var fXssFilter = jindo.$Fn(function(sHtml){
return sHtml.replace(this._rxFilter, "");
}, this).bind();
this.oApp.exec("ADD_CONVERTER",["HTMLSrc_TO_IR", fXssFilter]);
this.oApp.exec("ADD_CONVERTER",["IR_TO_DB", fXssFilter]);
}
});
}
var htDimension = {
nMinHeight:205,
nMinWidth:parseInt(elIRField.style.minWidth, 10)||570,
nHeight:elIRField.style.height||elIRField.offsetHeight,
nWidth:elIRField.style.width||elIRField.offsetWidth
};
var htConversionMode = {
bUseVerticalResizer : htParams.bUseVerticalResizer,
bUseModeChanger : htParams.bUseModeChanger
};
var aAdditionalFontList = htParams.aAdditionalFontList;
oEditor.registerPlugin(new nhn.husky.SE_EditingAreaManager("WYSIWYG", oIRTextarea, htDimension, htParams.fOnBeforeUnload, elAppContainer));
oEditor.registerPlugin(new nhn.husky.SE_EditingArea_WYSIWYG(oWYSIWYGIFrame)); // Tab Editor 모드
oEditor.registerPlugin(new nhn.husky.SE_EditingArea_HTMLSrc(oHTMLSrc)); // Tab HTML 모드
oEditor.registerPlugin(new nhn.husky.SE_EditingArea_TEXT(oTextArea)); // Tab Text 모드
oEditor.registerPlugin(new nhn.husky.SE2M_EditingModeChanger(elAppContainer, htConversionMode)); // 모드간 변경(Editor, HTML, Text)
oEditor.registerPlugin(new nhn.husky.SE_PasteHandler()); // WYSIWYG Paste Handler
oEditor.registerPlugin(new nhn.husky.HuskyRangeManager(oWYSIWYGIFrame));
oEditor.registerPlugin(new nhn.husky.Utils());
oEditor.registerPlugin(new nhn.husky.SE2M_UtilPlugin());
oEditor.registerPlugin(new nhn.husky.SE_WYSIWYGStyler());
oEditor.registerPlugin(new nhn.husky.SE2M_Toolbar(elAppContainer));
oEditor.registerPlugin(new nhn.husky.Hotkey()); // 단축키
oEditor.registerPlugin(new nhn.husky.SE_EditingAreaVerticalResizer(elAppContainer, htConversionMode)); // 편집영역 리사이즈
oEditor.registerPlugin(new nhn.husky.DialogLayerManager());
oEditor.registerPlugin(new nhn.husky.ActiveLayerManager());
oEditor.registerPlugin(new nhn.husky.SE_WYSIWYGStyleGetter()); // 커서 위치 스타일 정보 가져오기
oEditor.registerPlugin(new nhn.husky.SE_WYSIWYGEnterKey("P")); // 엔터 시 처리, 현재는 P로 처리
oEditor.registerPlugin(new nhn.husky.SE2M_ColorPalette(elAppContainer)); // 색상 팔레트
oEditor.registerPlugin(new nhn.husky.SE2M_FontColor(elAppContainer)); // 글자색
oEditor.registerPlugin(new nhn.husky.SE2M_BGColor(elAppContainer)); // 글자배경색
oEditor.registerPlugin(new nhn.husky.SE2M_FontNameWithLayerUI(elAppContainer, aAdditionalFontList)); // 글꼴종류
oEditor.registerPlugin(new nhn.husky.SE2M_FontSizeWithLayerUI(elAppContainer)); // 글꼴크기
oEditor.registerPlugin(new nhn.husky.SE2M_LineStyler());
oEditor.registerPlugin(new nhn.husky.SE2M_ExecCommand(oWYSIWYGIFrame));
oEditor.registerPlugin(new nhn.husky.SE2M_LineHeightWithLayerUI(elAppContainer)); // 줄간격
oEditor.registerPlugin(new nhn.husky.SE2M_Quote(elAppContainer)); // 인용구
oEditor.registerPlugin(new nhn.husky.SE2M_Hyperlink(elAppContainer)); // 링크
oEditor.registerPlugin(new nhn.husky.SE2M_SCharacter(elAppContainer)); // 특수문자
oEditor.registerPlugin(new nhn.husky.SE2M_FindReplacePlugin(elAppContainer)); // 찾기/바꾸기
oEditor.registerPlugin(new nhn.husky.SE2M_TableCreator(elAppContainer)); // 테이블 생성
oEditor.registerPlugin(new nhn.husky.SE2M_TableEditor(elAppContainer)); // 테이블 편집
oEditor.registerPlugin(new nhn.husky.SE2M_TableBlockStyler(elAppContainer)); // 테이블 스타일
if(nhn.husky.SE2M_AttachQuickPhoto){
oEditor.registerPlugin(new nhn.husky.SE2M_AttachQuickPhoto(elAppContainer)); // 사진
}
oEditor.registerPlugin(new nhn.husky.MessageManager(oMessageMap, htParams.I18N_LOCALE));
oEditor.registerPlugin(new nhn.husky.SE2M_QuickEditor_Common(elAppContainer)); // 퀵에디터 공통(표, 이미지)
oEditor.registerPlugin(new nhn.husky.SE2B_CSSLoader()); // CSS lazy load
if(window.frameElement){
oEditor.registerPlugin(new nhn.husky.SE_OuterIFrameControl(elAppContainer, 100));
}
oEditor.registerPlugin(new nhn.husky.SE_ToolbarToggler(elAppContainer, htParams.bUseToolbar));
oEditor.registerPlugin(new nhn.husky.SE2M_Accessibility(elAppContainer, htParams.I18N_LOCALE)); // 에디터내의 웹접근성 관련 기능모음 플러그인
oEditor.registerPlugin(new nhn.husky.SE2B_Customize_ToolBar(elAppContainer)); // 2.3 버젼에 있는 툴바 이용
return oEditor;
}

View File

@ -0,0 +1,167 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Smart Editor 2 Configuration : This setting must be changed by service
*/
window.nhn = window.nhn || {};
nhn.husky = nhn.husky || {};
nhn.husky.SE2M_Configuration = nhn.husky.SE2M_Configuration || {};
/**
* CSS LazyLoad를 위한 경로
*/
nhn.husky.SE2M_Configuration.SE2B_CSSLoader = {
sCSSBaseURI : "css"
};
/**
* 편집영역 설정
*/
nhn.husky.SE2M_Configuration.SE_EditingAreaManager = {
sCSSBaseURI : "css", // smart_editor2_inputarea.html 파일의 상대경로
sBlankPageURL : "smart_editor2_inputarea.html",
sBlankPageURL_EmulateIE7 : "smart_editor2_inputarea_ie8.html",
aAddtionalEmulateIE7 : [] // IE8 default 사용, IE9 ~ 선택적 사용
};
/**
* [웹접근성]
* 단축키 ALT+, ALT+. 을 이용하여 스마트에디터 영역의 이전/이후 요소로 이동할 수 있다.
* sBeforeElementId : 스마트에디터 영역 이전 요소의 id
* sNextElementId : 스마트에디터 영역 이후 요소의 id
*
* 스마트에디터 영역 이외의 제목 영역 (예:스마트에디터가 적용된 블로그 쓰기 페이지에서의 제목 영역) 에 해당하는 엘리먼트에서 Tab키를 누르면 에디팅 영역으로 포커스를 이동시킬 수 있다.
* sTitleElementId : 제목에 해당하는 input 요소의 id.
*/
nhn.husky.SE2M_Configuration.SE2M_Accessibility = {
ed_nonce : (typeof parent.ed_nonce !='undefined') ? parent.ed_nonce : '',
sBeforeElementId : '',
sNextElementId : '',
sTitleElementId : ''
};
/**
* 링크 기능 옵션
*/
nhn.husky.SE2M_Configuration.SE2M_Hyperlink = {
bAutolink : true // 자동링크기능 사용여부(기본값:true)
};
nhn.husky.SE2M_Configuration.Quote = {
sImageBaseURL : 'http://static.se2.naver.com/static/img'
};
nhn.husky.SE2M_Configuration.SE2M_ColorPalette = {
bUseRecentColor : false
};
nhn.husky.SE2B_Customize_ToolBar = jindo.$Class(/** @lends nhn.husky.SE2B_Customize_ToolBar */{
name : "SE2B_Customize_ToolBar",
/**
* @constructs
* @param {Object} oAppContainer 에디터를 구성하는 컨테이너
*/
$init : function(oAppContainer) {
this._assignHTMLElements(oAppContainer);
},
$BEFORE_MSG_APP_READY : function(){
this._addEventMoreButton();
},
/**
* @private
* @description DOM엘리먼트를 수집하는 메소드
* @param {Object} oAppContainer 툴바 포함 에디터를 감싸고 있는 div 엘리먼트
*/
_assignHTMLElements : function(oAppContainer) {
this.oAppContainer = oAppContainer;
this.elTextToolBarArea = jindo.$$.getSingle("div.se2_tool");
this.elTextMoreButton = jindo.$$.getSingle("button.se2_text_tool_more", this.elTextToolBarArea);
this.elTextMoreButtonParent = this.elTextMoreButton.parentNode;
this.welTextMoreButtonParent = jindo.$Element(this.elTextMoreButtonParent);
this.elMoreLayer = jindo.$$.getSingle("div.se2_sub_text_tool");
},
_addEventMoreButton : function (){
this.oApp.registerBrowserEvent(this.elTextMoreButton, "click", "EVENT_CLICK_EXPAND_VIEW");
this.oApp.registerBrowserEvent(this.elMoreLayer, "click", "EVENT_CLICK_EXPAND_VIEW");
},
$ON_EVENT_CLICK_EXPAND_VIEW : function(weEvent){
this.oApp.exec("TOGGLE_EXPAND_VIEW", [this.elTextMoreButton]);
weEvent.stop();
},
$ON_TOGGLE_EXPAND_VIEW : function(){
if(!this.welTextMoreButtonParent.hasClass("active")){
this.oApp.exec("SHOW_EXPAND_VIEW");
} else {
this.oApp.exec("HIDE_EXPAND_VIEW");
}
},
$ON_CHANGE_EDITING_MODE : function(sMode){
if(sMode != "WYSIWYG"){
this.elTextMoreButton.disabled =true;
this.welTextMoreButtonParent.removeClass("active");
this.oApp.exec("HIDE_EXPAND_VIEW");
}else{
this.elTextMoreButton.disabled =false;
}
},
$AFTER_SHOW_ACTIVE_LAYER : function(){
this.oApp.exec("HIDE_EXPAND_VIEW");
},
$AFTER_SHOW_DIALOG_LAYER : function(){
this.oApp.exec("HIDE_EXPAND_VIEW");
},
$ON_SHOW_EXPAND_VIEW : function(){
this.welTextMoreButtonParent.addClass("active");
this.elMoreLayer.style.display = "block";
},
$ON_HIDE_EXPAND_VIEW : function(){
this.welTextMoreButtonParent.removeClass("active");
this.elMoreLayer.style.display = "none";
},
/**
* CHANGE_EDITING_MODE모드 이후에 호출되어야 함.
* WYSIWYG 모드가 활성화되기 전에 호출이 되면 APPLY_FONTCOLOR에서 에러 발생.
*/
$ON_RESET_TOOLBAR : function(){
if(this.oApp.getEditingMode() !== "WYSIWYG"){
return;
}
//스펠체크 닫기
this.oApp.exec("END_SPELLCHECK");
//열린 팝업을 닫기 위해서
this.oApp.exec("DISABLE_ALL_UI");
this.oApp.exec("ENABLE_ALL_UI");
//글자색과 글자 배경색을 제외한 세팅
this.oApp.exec("RESET_STYLE_STATUS");
this.oApp.exec("CHECK_STYLE_CHANGE");
//최근 사용한 글자색 셋팅.
this.oApp.exec("APPLY_FONTCOLOR", ["#000000"]);
//더보기 영역 닫기.
this.oApp.exec("HIDE_EXPAND_VIEW");
}
});

View File

@ -0,0 +1,128 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*[
* SE_FIT_IFRAME
*
* 스마트에디터 사이즈에 맞게 iframe사이즈를 조절한다.
*
* none
*
---------------------------------------------------------------------------]*/
/**
* @pluginDesc 에디터를 싸고 있는 iframe 사이즈 조절을 담당하는 플러그인
*/
nhn.husky.SE_OuterIFrameControl = $Class({
name : "SE_OuterIFrameControl",
oResizeGrip : null,
$init : function(oAppContainer){
// page up, page down, home, end, left, up, right, down
this.aHeightChangeKeyMap = [-100, 100, 500, -500, -1, -10, 1, 10];
this._assignHTMLObjects(oAppContainer);
//키보드 이벤트
this.$FnKeyDown = $Fn(this._keydown, this);
if(this.oResizeGrip){
this.$FnKeyDown.attach(this.oResizeGrip, "keydown");
}
//마우스 이벤트
if(!!jindo.$Agent().navigator().ie){
this.$FnMouseDown = $Fn(this._mousedown, this);
this.$FnMouseMove = $Fn(this._mousemove, this);
this.$FnMouseMove_Parent = $Fn(this._mousemove_parent, this);
this.$FnMouseUp = $Fn(this._mouseup, this);
if(this.oResizeGrip){
this.$FnMouseDown.attach(this.oResizeGrip, "mousedown");
}
}
},
_assignHTMLObjects : function(oAppContainer){
oAppContainer = jindo.$(oAppContainer) || document;
this.oResizeGrip = cssquery.getSingle(".husky_seditor_editingArea_verticalResizer", oAppContainer);
this.elIFrame = window.frameElement;
this.welIFrame = $Element(this.elIFrame);
},
$ON_MSG_APP_READY : function(){
this.oApp.exec("SE_FIT_IFRAME", []);
},
$ON_MSG_EDITING_AREA_SIZE_CHANGED : function(){
this.oApp.exec("SE_FIT_IFRAME", []);
},
$ON_SE_FIT_IFRAME : function(){
this.elIFrame.style.height = document.body.offsetHeight+"px";
},
$AFTER_RESIZE_EDITING_AREA_BY : function(ipWidthChange, ipHeightChange){
this.oApp.exec("SE_FIT_IFRAME", []);
},
_keydown : function(oEvent){
var oKeyInfo = oEvent.key();
// 33, 34: page up/down, 35,36: end/home, 37,38,39,40: left, up, right, down
if(oKeyInfo.keyCode >= 33 && oKeyInfo.keyCode <= 40){
this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED", []);
this.oApp.exec("RESIZE_EDITING_AREA_BY", [0, this.aHeightChangeKeyMap[oKeyInfo.keyCode-33]]);
this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED", []);
oEvent.stop();
}
},
_mousedown : function(oEvent){
this.iStartHeight = oEvent.pos().clientY;
this.iStartHeightOffset = oEvent.pos().layerY;
this.$FnMouseMove.attach(document, "mousemove");
this.$FnMouseMove_Parent.attach(parent.document, "mousemove");
this.$FnMouseUp.attach(document, "mouseup");
this.$FnMouseUp.attach(parent.document, "mouseup");
this.iStartHeight = oEvent.pos().clientY;
this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED", [this.$FnMouseDown, this.$FnMouseMove, this.$FnMouseUp]);
},
_mousemove : function(oEvent){
var iHeightChange = oEvent.pos().clientY - this.iStartHeight;
this.oApp.exec("RESIZE_EDITING_AREA_BY", [0, iHeightChange]);
},
_mousemove_parent : function(oEvent){
var iHeightChange = oEvent.pos().pageY - (this.welIFrame.offset().top + this.iStartHeight);
this.oApp.exec("RESIZE_EDITING_AREA_BY", [0, iHeightChange]);
},
_mouseup : function(oEvent){
this.$FnMouseMove.detach(document, "mousemove");
this.$FnMouseMove_Parent.detach(parent.document, "mousemove");
this.$FnMouseUp.detach(document, "mouseup");
this.$FnMouseUp.detach(parent.document, "mouseup");
this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED", [this.$FnMouseDown, this.$FnMouseMove, this.$FnMouseUp]);
}
});

View File

@ -0,0 +1,48 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
// Sample plugin. Use CTRL+T to toggle the toolbar
nhn.husky.SE_ToolbarToggler = $Class({
name : "SE_ToolbarToggler",
bUseToolbar : true,
$init : function(oAppContainer, bUseToolbar){
this._assignHTMLObjects(oAppContainer, bUseToolbar);
},
_assignHTMLObjects : function(oAppContainer, bUseToolbar){
oAppContainer = jindo.$(oAppContainer) || document;
this.toolbarArea = cssquery.getSingle(".se2_tool", oAppContainer);
//설정이 없거나, 사용하겠다고 표시한 경우 block 처리
if( typeof(bUseToolbar) == 'undefined' || bUseToolbar === true){
this.toolbarArea.style.display = "block";
}else{
this.toolbarArea.style.display = "none";
}
},
$ON_MSG_APP_READY : function(){
this.oApp.exec("REGISTER_HOTKEY", ["ctrl+t", "SE_TOGGLE_TOOLBAR", []]);
},
$ON_SE_TOGGLE_TOOLBAR : function(){
this.toolbarArea.style.display = (this.toolbarArea.style.display == "none")?"block":"none";
this.oApp.exec("MSG_EDITING_AREA_SIZE_CHANGED", []);
}
});

View File

@ -0,0 +1,39 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if(typeof window.nhn=='undefined'){window.nhn = {};}
/**
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
* @name husky_SE2B_Lang_en_US.js
* @ unescape
*/
var oMessageMap_en_US = {
'SE_EditingAreaManager.onExit' : 'Contents have been changed.',
'SE_Color.invalidColorCode' : 'Enter the correct color code. \n\n ex) #000000, #FF0000, #FFFFFF, #ffffff, ffffff',
'SE_Hyperlink.invalidURL' : 'You have entered an incorrect URL.',
'SE_FindReplace.keywordMissing' : 'Enter the word you wish to find.',
'SE_FindReplace.keywordNotFound' : 'The word does not exist.',
'SE_FindReplace.replaceAllResultP1' : 'A total of ',
'SE_FindReplace.replaceAllResultP2' : ' matching contents have been changed.',
'SE_FindReplace.notSupportedBrowser' : 'Function cannot be used in the browser you are currently using. \n\nSorry for the inconvenience.',
'SE_FindReplace.replaceKeywordNotFound' : 'No word to change.',
'SE_LineHeight.invalidLineHeight' : 'Incorrect value.',
'SE_Footnote.defaultText' : 'Enter footnote details.',
'SE.failedToLoadFlash' : 'The function cannot be used because flash has been blocked.',
'SE2M_EditingModeChanger.confirmTextMode' : 'The contents remain, but editing effects, including fonts, and attachments, \n\nsuch as images, will disappear when changed to text mode. \n\n Make changes?',
'SE2M_FontNameWithLayerUI.sSampleText' : 'ABCD'
};

View File

@ -0,0 +1,39 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if(typeof window.nhn=='undefined'){window.nhn = {};}
/**
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
* @name husky_SE2B_Lang_ja_JP.js
* @ unescape
*/
var oMessageMap_ja_JP = {
'SE_EditingAreaManager.onExit' : '内容が変更されました。',
'SE_Color.invalidColorCode' : 'カラーコードを正しく入力してください。 \n\n 例) #000000, #FF0000, #FFFFFF, #ffffff, ffffff',
'SE_Hyperlink.invalidURL' : '入力したURLが正しくありません。',
'SE_FindReplace.keywordMissing' : 'お探しの単語を入力してください。',
'SE_FindReplace.keywordNotFound' : 'お探しの単語がありません。',
'SE_FindReplace.replaceAllResultP1' : '一致する内容が計',
'SE_FindReplace.replaceAllResultP2' : '件変わりました。',
'SE_FindReplace.notSupportedBrowser' : '現在ご使用中のブラウザーではご利用いただけない機能です。\n\nご不便をおかけしまして申し訳ございません。',
'SE_FindReplace.replaceKeywordNotFound' : '変更される単語がありません。',
'SE_LineHeight.invalidLineHeight' : '誤った値です。',
'SE_Footnote.defaultText' : '脚注内容を入力してください。',
'SE.failedToLoadFlash' : 'フラッシュが遮断されているため、この機能は使用できません。',
'SE2M_EditingModeChanger.confirmTextMode' : 'テキストモードに切り換えると、作成された内容は維持されますが、\n\nフォント等の編集効果と画像等の添付内容が消えることになります。\n\n切り換えますか',
'SE2M_FontNameWithLayerUI.sSampleText' : 'あいうえお'
};

View File

@ -0,0 +1,39 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if(typeof window.nhn=='undefined'){window.nhn = {};}
/**
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
* @name husky_SE2B_Lang_ko_KR.js
* @ unescape
*/
var oMessageMap = {
'SE_EditingAreaManager.onExit' : '내용이 변경되었습니다.',
'SE_Color.invalidColorCode' : '색상 코드를 올바르게 입력해 주세요. \n\n 예) #000000, #FF0000, #FFFFFF, #ffffff, ffffff',
'SE_Hyperlink.invalidURL' : '입력하신 URL이 올바르지 않습니다.',
'SE_FindReplace.keywordMissing' : '찾으실 단어를 입력해 주세요.',
'SE_FindReplace.keywordNotFound' : '찾으실 단어가 없습니다.',
'SE_FindReplace.replaceAllResultP1' : '일치하는 내용이 총 ',
'SE_FindReplace.replaceAllResultP2' : '건 바뀌었습니다.',
'SE_FindReplace.notSupportedBrowser' : '현재 사용하고 계신 브라우저에서는 사용하실수 없는 기능입니다.\n\n이용에 불편을 드려 죄송합니다.',
'SE_FindReplace.replaceKeywordNotFound' : '바뀔 단어가 없습니다',
'SE_LineHeight.invalidLineHeight' : '잘못된 값입니다.',
'SE_Footnote.defaultText' : '각주내용을 입력해 주세요',
'SE.failedToLoadFlash' : '플래시가 차단되어 있어 해당 기능을 사용할 수 없습니다.',
'SE2M_EditingModeChanger.confirmTextMode' : '텍스트 모드로 전환하면 작성된 내용은 유지되나, \n\n글꼴 등의 편집효과와 이미지 등의 첨부내용이 모두 사라지게 됩니다.\n\n전환하시겠습니까?',
'SE2M_FontNameWithLayerUI.sSampleText' : '가나다라'
};

View File

@ -0,0 +1,39 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if(typeof window.nhn=='undefined'){window.nhn = {};}
/**
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
* @name husky_SE2B_Lang_zh_CN.js
* @ unescape
*/
var oMessageMap_zh_CN = {
'SE_EditingAreaManager.onExit' : '内容有了变化。',
'SE_Color.invalidColorCode' : '请你输入正确的色相代码。 \n\n 例) #000000, #FF0000, #FFFFFF, #ffffff, ffffff',
'SE_Hyperlink.invalidURL' : '你输入的URL不符条件。',
'SE_FindReplace.keywordMissing' : '请你输入要找的词汇。',
'SE_FindReplace.keywordNotFound' : '没有词汇符合条件。',
'SE_FindReplace.replaceAllResultP1' : '符合条件的内容改编为',
'SE_FindReplace.replaceAllResultP2' : '件',
'SE_FindReplace.notSupportedBrowser' : '这是你现在使用的浏览器不可支持的功能。\n\n麻烦你很道歉。',
'SE_FindReplace.replaceKeywordNotFound' : '没有词汇要改变。',
'SE_LineHeight.invalidLineHeight' : '这是有问题的值。',
'SE_Footnote.defaultText' : '请你输入脚注内容。',
'SE.failedToLoadFlash' : 'flash被隔绝不能使用该功能。',
'SE2M_EditingModeChanger.confirmTextMode' : '转换为text模式就能维持制作内容\n\n但字体等编辑效果和图像等附件内容都会消失。\n\n你还要继续吗',
'SE2M_FontNameWithLayerUI.sSampleText' : 'ABCD'
};

View File

@ -0,0 +1,39 @@
/*
Copyright (C) NAVER corp.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if(typeof window.nhn=='undefined'){window.nhn = {};}
/**
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
* @name husky_SE2B_Lang_zh_TW.js
* @ unescape
*/
var oMessageMap_zh_TW = {
'SE_EditingAreaManager.onExit' : '內容已被更改。',
'SE_Color.invalidColorCode' : '請輸入正確的顔色代碼。\n\n例子#000000, #FF0000, #FFFFFF, #ffffff, ffffff',
'SE_Hyperlink.invalidURL' : '輸錯URL',
'SE_FindReplace.keywordMissing' : '請輸入要查詢的單詞。',
'SE_FindReplace.keywordNotFound' : '要查詢的單詞不存在。',
'SE_FindReplace.replaceAllResultP1' : '一致的內容總有',
'SE_FindReplace.replaceAllResultP2' : '件已被更改。',
'SE_FindReplace.notSupportedBrowser' : '當前的浏覽器上無法使用此功能。\n\n很抱歉給你添麻煩了。',
'SE_FindReplace.replaceKeywordNotFound' : '要更改的詞彙不存在。',
'SE_LineHeight.invalidLineHeight' : '爲有錯誤的值。',
'SE_Footnote.defaultText' : '請輸入注腳內容。',
'SE.failedToLoadFlash' : 'Flash被屏蔽導致無法使用此功能。',
'SE2M_EditingModeChanger.confirmTextMode' : '如轉換爲文本模式,雖然維持已寫成的內容,\n\n但字號等編輯效果和圖像等附加內容都會被消失。\n\n是否轉換',
'SE2M_FontNameWithLayerUI.sSampleText' : 'ABCD'
};