그누보드

스마트 에디터 글꼴 추가

헤롱헤롱이 2021. 1. 28. 15:15

/plugin/editor/smarteditor2/config.js

 

//폰트 셋 추가

 var aAdditionalFontSet = [["Cafe24Oneprettynight", "카페24고운밤"]];

 

nhn.husky.EZCreator.createInIFrame({

                oAppRef: oEditors,

                elPlaceHolder: get_id,

                sSkinURI: g5_editor_url+"/SmartEditor2Skin.html"

                htParams : {

                    bUseToolbar : true,                     // 툴바 사용 여부 (true:사용/ false:사용하지 않음)

                    bUseVerticalResizer : true,       // 입력창 크기 조절바 사용 여부 (true:사용/ false:사용하지 않음)

                    bUseModeChanger : true,                 // 모드 탭(Editor | HTML | TEXT) 사용 여부 (true:사용/ false:사용하지 않음)

                    bSkipXssFilter : true,            // client-side xss filter 무시 여부 (true:사용하지 않음 / 그외:사용)

                    aAdditionalFontList : aAdditionalFontSet,           // 추가 글꼴 목록

                    fOnBeforeUnload : function(){

                        //alert("완료!");

                    }

                }, //boolean

                fOnAppLoad : function(){

                    //예제 코드

                    //oEditors.getById["ir1"].exec("PASTE_HTML", ["로딩이 완료된 후에 본문에 삽입되는 text입니다."]);

                },

                fCreator: "createSEditor2"

            });

 

 

 

//추가 글꼴 폰트추가

/plugin/editor/smarteditor2/css/ko_KR/smart_editor2_in.css, smart_editor2_out.css

 

@font-face {

    font-family: 'Cafe24Oneprettynight';

    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_twelve@1.1/Cafe24Oneprettynight.woff') format('woff');

    font-weight: normal;

    font-style: normal;

}