스마트에디터2.9 글꼴추가 방법 정보
스마트에디터2.9 글꼴추가 방법본문
https://sir.kr/g5_plugin/2284 플러그인 관련 입니다.
config.js
aAdditionalFontList 행에 배열로 추가해주세요.
(function($){
$(document).ready(function() {
$(".smarteditor2").each( function(index){
var get_id = $(this).attr("id");
if( !get_id || $(this).prop("nodeName") != 'TEXTAREA' ) return true;
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,
aAdditionalFontList : [['Independence_hall','독립기념관체'], ['Jeju_Myeongjo','제주명조'], ['Chosunilbo_myungjo','조선일보명조체']], // 추가 글꼴 목록
fOnBeforeUnload : function(){
//alert("완료!");
}
}, //boolean
fOnAppLoad : function(){
//예제 코드
//oEditors.getById["ir1"].exec("PASTE_HTML", ["로딩이 완료된 후에 본문에 삽입되는 text입니다."]);
},
fCreator: "createSEditor2"
});
});
});
})(jQuery);
smarteditor2.9\css\ko_KR\smart_editor2.css
최상단에 넣어주시면 됩니다.
@font-face {
font-family: 'Chosunilbo_myungjo';
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/Chosunilbo_myungjo.woff') format('woff');
font-weight: normal;
font-style: normal;
}
.... etc
SmartEditor2Skin.html
35번줄 글꼴레이어 관련 주석자리에 넣어주시면 됩니다.
<li><button type="button"><span>조선일보명조체<span>(</span><em style="font-family:'조선일보명조체',Chosunilbo_myungjo;">가나다라</em><span>)</span></span></button></li>
여기까지만 하면, 목록에는 폰트가 나타나도, 에디터에는 반영이 안되는 문제가 있습니다.
이때는 해당 테마의 CSS에 "smarteditor2.9\css\ko_KR\smart_editor2.css" 여기서 추가한 것과 같이 font-face를 추가해주시면 정상작동 합니다.
!-->!-->!-->
추천
7
7
댓글 5개
오 감사합니다~!
감사합니다^^
유용한정보 감사합니다^^
좋은정보 감사합니다.
좋은 정보 감사합니다 !