1/** 2 * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. 3 * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license 4 */ 5 6 /* 7 full version naming 8toolbar : [ 9 { name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] }, 10 { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, 11 { name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] }, 12 { name: 'insert', items: [ 'Image', 'Youtube', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] }, 13 '/', 14 { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'CopyFormatting', 'RemoveFormat' ] }, 15 { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] }, 16 { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, 17 { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] }, 18 { name: 'colors', items: [ 'TextColor', 'BGColor' ] }, 19 20 // full version config 21 { name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'ExportPdf', 'Preview', 'Print', '-', 'Templates' ] }, 22 { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, 23 { name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] }, 24 { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, 25 '/', 26 { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'CopyFormatting', 'RemoveFormat' ] }, 27 { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] }, 28 { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, 29 { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] }, 30 '/', 31 { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] }, 32 { name: 'colors', items: [ 'TextColor', 'BGColor' ] }, 33 { name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] }, 34 { name: 'about', items: [ 'About' ] } 35 CodeSnippet 36 AddLayout, 37 lineheight, 38 Sourcedialog 39 devtools 40], 41*/ 42 43 44CKEDITOR.disableAutoInline = true; 45CKEDITOR.editorConfig = function( config ) { 46 config.language = 'ko'; 47}; 48 49// CKEDITOR Toolbar Define 50var cke_full_toolbar = [ 51 52]; 53 54var cke_simple_toolbar = [ 55 { name: 'document', items: [ 'Sourcedialog','-','Templates'] },
56 { name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] }, 57 { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'TextColor','BGColor'] }, 58 { name: 'align', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'Subscript', 'Superscript'] }, 59 { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'spacingsliders', 'RemoveFormat' ]}, 60 { name: 'insert', items: [ 'Image', 'Youtube', 'Table', 'Link', 'Unlink', 'HorizontalRule','SpecialChar', 'simplebutton'] }, 61]; 62 63var cke_inline_toolbar = [ 64 { name: 'document', items: [ 'Sourcedialog'] }, 65 { name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize','spacingsliders'] }, 66 { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'] }, 67 '/', 68 { name: 'colors', items: ['TextColor','BGColor'] }, 69 { name: 'align', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] }, 70 { name: 'insert', items: [ 'Image', 'Youtube', 'Table', 'divide', 'Link', 'Unlink', 'HorizontalRule','SpecialChar', 'simplebutton'] }, 71 { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'RemoveFormat' ]}, 72]; 73var cke_inline_m_toolbar = [ 74 { name: 'document', items: [ 'Sourcedialog'] }, 75 { name: 'colors', items: ['TextColor','BGColor'] }, 76 { name: 'align', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] }, 77 { name: 'insert', items: [ 'Image', 'Youtube' ] }, 78]; 79 80 81 82function get_config_ckeditor4(mode, uploader='') { 83 if(mode=='inline') { 84 var basic = { 85 toolbar : cke_inline_toolbar, 86 forcePasteAsPlainText : true,
87 extraPlugins: 'youtube,sourcedialog,image2,tableresize,balloontoolbar,quicktable,simplebutton,spacingsliders,divide', 88 }; 89 } else if(mode=='inline_m') { // inline mobile version; 90 var basic = { 91 toolbar : cke_inline_m_toolbar, 92 forcePasteAsPlainText : true, 93 extraPlugins: 'youtube,sourcedialog,image2,tableresize,balloontoolbar,quicktable,spacingsliders,simplebutton', 94 }; 95 } else { // full version 96 var basic = { 97 toolbar : cke_simple_toolbar, 98 forcePasteAsPlainText : false, 99 pasteFilter : null, 100 extraPlugins: 'youtube,sourcedialog,image2,tableresize,balloontoolbar,quicktable,spacingsliders,simplebutton', 101 }; 102 } 103 104 var add = { 105 language : 'ko', 106 skin : 'thk', 107 contentsCss : [ 108 $._default+'common/ckeditor4/contents.css?c=1', 109 $._default+'common/css/template.css?c=250822' 110 ], 111 startupFocus: false, 112 resize_enabled: true, 113 /*allowedContent:true, */ 114 removePlugins:'image,iframe,exportpdf', 115 /*removeButtons : 'Smiley,Save,Paste,PasteText,PasteFromWord,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Maximize,ShowBlocks,About', */ 116 font_names : 'SUIT(EL)/SUIT ExtraLight;SUIT(L)/SUIT Light;SUIT(R)/SUIT Regular;SUIT(M)/SUIT Medium;SUIT(SB)/SUIT SemiBold;SUIT(B)/SUIT Bold;SUIT(EB)/SUIT ExtraBold;SUIT(H)/SUIT Heavy;Noto Sans/Noto Sans KR;Noto Serif KR/Noto Serif KR;ëë ê³ ë/ëë ê³ ë,nanumgothic;ë§ì ê³ ë/ë§ì ê³ ë,malgungothic;Roboto/Roboto;ëì/ëì,dotumche;ê¶ì/ê¶ì,gungsuhche;Myriad/Myriad;Myriad_bold/Myriad_bold;Arial/Arial;Open Sans/OpenSans_regular;ProximaNova/ProximaNova_regular;Raleway/Raleway_medium;Raleway_light/Raleway_light;Courier New/CourierNew_regular;Impact/Impact_regular;Times New Roman/TimesNewRoman_regular', 117 // font_names : 'Pretendard/Pretendard;Pretendard(EL)/Pretendard ExtraLight;Pretendard(L)/Pretendard Light;Pretendard(R)/Pretendard Regular;Pretendard(M)/Pretendard Medium;Pretendard(SB)/Pretendard SemiBold;Pretendard(B)/Pretendard Bold;Pretendard(EB)/Pretendard ExtraBold;Noto Sans/Noto Sans KR;Noto Serif KR/Noto Serif KR;ëë ê³ ë/ëë ê³ ë,nanumgothic;ë§ì ê³ ë/ë§ì ê³ ë,malgungothic;Roboto/Roboto;ëì/ëì,dotumche;ê¶ì/ê¶ì,gungsuhche;Myriad/Myriad;Myriad_bold/Myriad_bold;Arial/Arial;Open Sans/OpenSans_regular;ProximaNova/ProximaNova_regular;Raleway/Raleway_medium;Raleway_light/Raleway_light;Courier New/CourierNew_regular;Impact/Impact_regular;Times New Roman/TimesNewRoman_regular', 118 fontSize_sizes : '12/0.75rem;13/0.813rem;14/0.875rem;15/0.938rem;16/1rem;18/1.125rem;20/1.25rem;22/1.375rem;24/1.5rem;26/1.625rem;28/1.75rem;30/1.875rem;32/2rem;36/2.25rem;40/2.5rem;44/2.75rem;48/3rem;54/3.375rem;60/3.75rem;66/4.125rem;72/4.5rem;', 119 line_height:'1.2;1.3;1.4;1.5;1.6;1.7;1.8;2;2.5;3', 120 disallowedContent : 'img{width*,height*};', 121 filebrowserImageUploadUrl : uploader, 122 enterMode :CKEDITOR.ENTER_BR, 123 shiftEnterMode :CKEDITOR.ENTER_P, 124 // extraAllowedContent : 'address(*)[*]; abbr(*)[*]; table(*)[*]{*}; tr[*]{*}; td(*)[*]{*}; th(*)[*]{*}; thead[*]{*}; tbody[*]{*}; tfoot[*]{*}; iframe(*)[*]{*}; video(*)[*]{*};source(*)[*]{*};button(*)[*]{*}; div(*)[*]{*}; ul(*)[*]; ol(*)[*]; li(*)[*]; p(*)[*]{*}; a[!href](*){*}; img(*)[*]{*}; em(*)[*]{*}; span(*)[*]{*}; h2(*)[*]; h3(*)[*]; h4(*)[*]; h5(*)[*]; h6(*)[*];', 125 //extraAllowedContent : '*(*)', 126 allowedContent :true, 127 extraAllowedContent : true, 128 autoGrow_minHeight:500, 129 autoGrow_onStartup:true, 130 image2_alignClasses : ['image-align-left', 'image-align-center', 'image-align-right'], 131 codeSnippet_theme: 'obsidian', 132 format_h1 : { element: 'h1', attributes: { 'class': 'thk-h1' } }, 133 format_h2 : { element: 'h2', attributes: { 'class': 'thk-h2' } }, 134 format_h3 : { element: 'h3', attributes: { 'class': 'thk-h3' } }, 135 format_h4 : { element: 'h4', attributes: { 'class': 'thk-h4' } }, 136 format_h5 : { element: 'h5', attributes: { 'class': 'thk-h5' } }, 137 format_h6 : { element: 'h6', attributes: { 'class': 'thk-h6' } }, 138 format_div : { element: 'div', attributes: { 'class': 'thk-div' } }, 139 format_p : { element: 'p', attributes: { 'class': 'thk-p' } }, 140 format_tags: 'h1;h2;h3;h4;h5;h6;p;div', 141 /*toolbarCanCollapse :true, // ë©ë´ì¶ìê°ë¥ì¬ë¶ : classic ë§ í´ë¹ */ 142 /*colorButton_colors: 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00', */ 143 // colorButton_enableAutomatic: false, 144 colorButton_colors : 145 '000,111,333,666,999,FFF,'+ 146 'C0392B,E74C3C,9B59B6,8E44AD,2980B9,3498DB,'+ 147 '1ABC9C,16A085,27AE60,2ECC71,F1C40F,F39C12,'+ 148 'E67E22,D35400,FF0000,00FF00, 0000FF', 149 /* 150 colorButton_backStyle:{ 151 element:'span', 152 classes:'thk-span', 153 styles: { 'background-color':'#(color)' } 154 }, 155 */ 156 fillEmptyBlocks:false, 157 autoParagraph:false, 158 } 159 160 // object.assign 161 var config = Object.assign(basic, add); 162 // console.log(config); 163 return config; 164} 165 166 167var ckdefaultconfig = get_config_ckeditor4('full') ; 168 169 170// ê¸°ë³¸ê° ë³ê²½ ë° ê¸°ë³¸ ì¸í ë³ê²½í ì ìë í¨ì ! 171CKEDITOR.on('dialogDefinition', function(ev) { 172 173 var dialog = ev.data.definition.dialog; 174 var dialogName = ev.data.name; 175 176 var dialogDefinition = ev.data.definition; 177 /* 178 if ( dialogName == 'link' ) { 179 var infoTab = dialogDefinition.getContents( 'info' ); 180 var urlField = infoTab.get( 'url' ); 181 urlField[ 'default' ] = 'www.example.com'; 182 }*/ 183 184 if (dialogName == 'table') { 185 var infoTab = dialogDefinition.getContents( 'info' ); 186 var advTab = dialogDefinition.getContents( 'advanced' ); 187 188 var txtW = infoTab.get('txtWidth'); 189 txtW['default'] = '100%'; 190 var txtCellS = infoTab.get( 'txtCellSpace' ); 191 txtCellS['default'] = '0'; 192 var txtBorder = infoTab.get( 'txtBorder' ); 193 txtBorder['default'] = '0'; 194 var txtCellP = infoTab.get( 'txtCellPad' ); 195 txtCellP['default'] = '0'; 196 197 198 var advStyle = advTab.get('advStyles'); 199 advStyle['default'] = 'width:80%';
200 var advClass = advTab.get('advCSSClasses'); 201 advClass['default'] = 'ck4_table'; 202 } 203 204 if(dialogName =='image2') { 205 var info = dialogDefinition.getContents( 'info' ); 206 dialog.on('show', function (obj) { 207 this.selectPage('Upload'); //ì ë¡ëí ì¼ë¡ ìì 208 }); 209 } 210}); 211 212CKEDITOR.on('instanceReady', function(evt) { 213 var editor = evt.editor; 214 editor.balloonToolbars.create({ 215 buttons:'JustifyLeft,JustifyCenter,JustifyRight,Link,Unlink,Image', 216 widgets:'image' 217 }); 218 editor.balloonToolbars.create({ 219 buttons:'Link,Unlink', 220 cssSelector:'a' 221 }); 222 223 editor.dataProcessor.writer.selfClosingEnd='>'; 224 225 var dtd = CKEDITOR.dtd; 226 for (var e in CKEDITOR.tools.extend({}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent)) { 227 228 editor.dataProcessor.writer.setRules(e, { 229 indent: true, 230 breakBeforeOpen : true, // trueë¡ ëì´ììì.. 231 breakAfterOpen : false, 232 breakBeforeClose : false, 233 breakAfterClose : true 234 }); 235 } 236 // editor.setMode('source'); 237}); 238 239
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.