You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

7 years ago
  1. <textarea name="<?=$name?>" id="<?=$id?>" style="width:100%;height:<?=$height?>"><?=$contents?></textarea>
  2. <script>
  3. var oEditors = [];
  4. nhn.husky.EZCreator.createInIFrame({
  5. oAppRef: oEditors,
  6. elPlaceHolder: '<?=$id?>',
  7. sSkinURI: '<?=$editor_url?>' +"/SmartEditor2Skin.html",
  8. htParams : {
  9. bUseToolbar : true,
  10. bUseVerticalResizer : true,
  11. bUseModeChanger : true,
  12. bSkipXssFilter : true,
  13. //aAdditionalFontList : aAdditionalFontSet, // 추가 글꼴 목록
  14. fOnBeforeUnload : function(){
  15. //alert("완료!");
  16. }
  17. }, //boolean
  18. fOnAppLoad : function(){
  19. //예제 코드
  20. //oEditors.getById["ir1"].exec("PASTE_HTML", ["로딩이 완료된 후에 본문에 삽입되는 text입니다."]);
  21. },
  22. fCreator: "createSEditor2"
  23. });
  24. $("#<?=$id?>").parents('form').submit(function(e){
  25. var <?=$id?>_editor_data = oEditors.getById['<?=$id?>'].getIR();
  26. oEditors.getById['<?=$id?>'].exec('UPDATE_CONTENTS_FIELD', []);
  27. if(jQuery.inArray(document.getElementById('<?=$id?>').value.toLowerCase().replace(/^\s*|\s*$/g, ''), ['&nbsp;','<p>&nbsp;</p>','<p><br></p>','<div><br></div>','<p></p>','<br>','']) != -1){
  28. $("#<?=$id?>").val('');
  29. }
  30. });
  31. </script>