|
|
@@ -1,73 +0,0 @@
|
|
|
-/*
|
|
|
- * Smart Editor Java Script written by gagamel.
|
|
|
- *
|
|
|
- * Copyright (c) 2010 gagamel
|
|
|
- * Dual licensed under GPL (GPL-LICENSE.txt) licenses.
|
|
|
- *
|
|
|
- * $Date: 2019-07-02 $
|
|
|
- *
|
|
|
- * 사용 예)
|
|
|
- * // HTML 태그는 textarea로 구성
|
|
|
- * // id는 gagaSe2.createSmartEditor 함수 호출 시에 넘겨줘야 한다.
|
|
|
- * <textarea name="contentKorWeb" id="contentKorWeb" rows="5" cols="50" style="width: 100%; height: 400px;"></textarea>
|
|
|
- *
|
|
|
- * // Import할 자바스크립트 파일
|
|
|
- * <script type="text/javascript" src="/se2/js/service/HuskyEZCreator.js?v=2019070211"></script>
|
|
|
- * <script type="text/javascript" src="/ux/plugins/gaga/gaga.se2.js?v=2019070222"></script>
|
|
|
- *
|
|
|
- * <script type="text/javascript">
|
|
|
- * // Get a SmartEditor2 options
|
|
|
- * var se2Options = gagaSe2.getEditorOptions();
|
|
|
- *
|
|
|
- * $(document).ready(function() {
|
|
|
- * // Create a SmartEditor2
|
|
|
- * gagaSe2.createSmartEditor(se2Options, 'contentKorWeb');
|
|
|
- * });
|
|
|
- * </script>
|
|
|
- */
|
|
|
-
|
|
|
-var gagaSe2 = {
|
|
|
- obj : {
|
|
|
- oEditors : []
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * Get a Smart Editor options
|
|
|
- */
|
|
|
- getEditorOptions : function() {
|
|
|
- return {
|
|
|
- oAppRef: this.obj.oEditors,
|
|
|
- sSkinURI: '/se2/SmartEditor2Skin.html',
|
|
|
- htParams : {
|
|
|
- bUseToolbar : true, // 툴바사용
|
|
|
- bUseVerticalResizer : true, // 입력창크기조절바사용
|
|
|
- bUseModeChanger : true, // 모드탭(Editor|HTML|TEXT)사용
|
|
|
-// bSkipXssFilter : true, // client-side xss filter 무시
|
|
|
-// aAdditionalFontList : aAdditionalFontSet, // 추가 글꼴 목록
|
|
|
- fOnBeforeUnload : function() {
|
|
|
- }
|
|
|
- },
|
|
|
- fCreator: 'createSEditor2'
|
|
|
- };
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * Create a Smart Editor
|
|
|
- * @param editorId - 에디터 ID
|
|
|
- */
|
|
|
- createSmartEditor : function(editorOptions, editorId) {
|
|
|
- editorOptions.elPlaceHolder = editorId;
|
|
|
- nhn.husky.EZCreator.createInIFrame(editorOptions);
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 스마트에디터에 입력한 내용이 editorId로 지정된 textarea에 설정되고,
|
|
|
- * textarea에 설정된 값을 반환한다.
|
|
|
- * @param editorId - 에디터 ID
|
|
|
- */
|
|
|
- getContents : function(editorId) {
|
|
|
- this.obj.oEditors.getById[editorId].exec("UPDATE_CONTENTS_FIELD", []);
|
|
|
- return document.getElementById(editorId).value;
|
|
|
- }
|
|
|
-
|
|
|
-}
|