var config = new Object(); // create new config object config.width = "100%"; config.height = "200px"; config.bodyStyle = 'background-color: #FFFFFF; font-family: "굴림"; font-size: 10pt; line-height:150%;margin: 10 10 10 10 '; config.debug = 0; config.toolbar = [ ['fontname'], ['fontsize'], ['bold','italic','underline','separator'], ['justifyleft','justifycenter','justifyright','separator'], ['OrderedList','UnOrderedList','Outdent','Indent','separator'], ['forecolor','backcolor','separator'], ['HorizontalRule','Createlink','InsertImage','InsertTable','htmlmode'], ]; config.fontnames = { "굴림": "굴림, 굴림체", "돋움": "돋움, 돋움체", "바탕": "바탕, 바탕체", "궁서": "궁서, 궁서체" }; config.fontsizes = { "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7" }; config.fontstyles = [ // make sure classNames are defined in the page the content is being display as well in or they won't work! { name: "headline", className: "headline", classStyle: "font-family: arial black, arial; font-size: 28px; letter-spacing: -2px;" }, { name: "arial red", className: "headline2", classStyle: "font-family: arial black, arial; font-size: 12px; letter-spacing: -2px; color:red" }, { name: "verdana blue", className: "headline4", classStyle: "font-family: verdana; font-size: 18px; letter-spacing: -2px; color:blue" } ]; //editor_generate('i_contents',config,'#F7F7F7'); var oEditors = []; // 추가 글꼴 목록 //var aAdditionalFontSet = [["MS UI Gothic", "MS UI Gothic"], ["Comic Sans MS", "Comic Sans MS"],["TEST","TEST"]]; nhn.husky.EZCreator.createInIFrame({ oAppRef: oEditors, elPlaceHolder: "ir1", sSkinURI: "../naver_editor/SmartEditor2Skin.html", htParams : { bUseToolbar : true, // 툴바 사용 여부 (true:사용/ false:사용하지 않음) bUseVerticalResizer : true, // 입력창 크기 조절바 사용 여부 (true:사용/ false:사용하지 않음) bUseModeChanger : true, // 모드 탭(Editor | HTML | TEXT) 사용 여부 (true:사용/ false:사용하지 않음) //aAdditionalFontList : aAdditionalFontSet, // 추가 글꼴 목록 fOnBeforeUnload : function(){ //alert("완료!"); } }, //boolean fOnAppLoad : function(){ //예제 코드 //oEditors.getById["ir1"].exec("PASTE_HTML", [""]); }, fCreator: "createSEditor2" }); function pasteHTML() { var sHTML = "이미지도 같은 방식으로 삽입합니다.<\/span>"; oEditors.getById["ir1"].exec("PASTE_HTML", [sHTML]); } function showHTML() { var sHTML = oEditors.getById["ir1"].getIR(); alert(sHTML); } function submitContents(elClickedObj) { oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []); // 에디터의 내용이 textarea에 적용됩니다. // 에디터의 내용에 대한 값 검증은 이곳에서 document.getElementById("ir1").value를 이용해서 처리하면 됩니다. try { elClickedObj.form.submit(); } catch(e) {} } function setDefaultFont() { var sDefaultFont = '궁서'; var nFontSize = 24; oEditors.getById["ir1"].setDefaultFont(sDefaultFont, nFontSize); }