GUI 에디터 추가 옵션

This commit is contained in:
2018-08-30 01:56:47 +09:00
parent 613425855d
commit c6cc92dbdf
3 changed files with 45 additions and 4 deletions
+37 -2
View File
@@ -4,6 +4,8 @@
jQuery(function($){
jQuery.trumbowyg.langs.ko.fontFamily = '글꼴';
function guiEditorInit($obj, editable){
var $submitBtn = $obj.find('.submit');
var $noticeInput = $obj.find('.input_form');
@@ -19,8 +21,41 @@ function guiEditorInit($obj, editable){
autogrow: true,
autogrowOnEnter: true,
lang: 'ko',
removeformatPasted: true
removeformatPasted: true,
imageWidthModalEdit: true,
minimalLinks: true,
btns: [
['viewHTML'],
['undo', 'redo'], // Only supported in Blink browsers
['formatting'],
['fontfamily', 'fontsize'],
['foreColor', 'backColor'],
['emoji'],
['strong', 'em', 'del'],
['link'],
['insertImage'],
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
['unorderedList', 'orderedList'],
['horizontalRule'],
['removeformat'],
['fullscreen']
],
plugins: {
fontfamily : {
fontList:[
{name:'맑은 고딕', family:"'맑은 고딕'"},
{name:'나눔 고딕', family:"'Nanum Gothic', sans-serif"},
{name:'나눔 명조', family:"'Nanum Myeongjo', serif"},
{name:'나눔손글씨 펜체', family:"'Nanum Pen Script', cursive"},
{name:'굴림', family:"'굴림'"},
{name:'굴림체', family:"'굴림체'"},
{name:'바탕', family:"'바탕'"},
{name:'바탕체', family:"'바탕체'"},
{name:'궁서', family:"'궁서'"},
{name:'궁서체', family:"'궁서체'"},
]
}
},
}).trumbowyg('html', $noticeInput.val());
}