그누보드 댓글 에디터 적용 > 공책

본문 바로가기
010.6356.7610
  • design1001@naver.com
  • @design1001
작업물 전체보기

PHP with GNU

PHP with GNU 그누보드 댓글 에디터 적용

페이지 정보

  • 작성자후야
  • 조회 : 309
  • 작성일 : 2021-06-29 10:27

본문

출처: https://ysb334kr.tistory.com/186


그누보드에 게시판에 댓글 에디터 사용

에디터 추가 방법

include_once(G5_EDITOR_LIB);

<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<?php echo $comment_id ?>">
<input type="hidden" value="<?php echo $list[$i]['wr_datetime'] ?>" id="save_datetime_<?php echo $comment_id ?>">  //등록일 추가

<script>
var oEditors = [];

function _editor() {
    nhn.husky.EZCreator.createInIFrame({
        oAppRef : oEditors,
        elPlaceHolder : "wr_content",
        sSkinURI : "/plugin/editor/smarteditor2/SmartEditor2Skin.html", 

        htParams : {
            bUseToolbar : true,
            bUseVerticalResizer : true,
            bUseModeChanger : true,
            fOnBeforeUnload : function(){
            }
        }, //boolean

        fOnAppLoad : function(){
        },

        fCreator : "createSEditor2"
    });
}

document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
document.getElementById('wr_datetime').value = document.getElementById('save_datetime_' + comment_id).value;  //등록일 추가

if(comment_id) _editor(); //마지막에 추가
</script>

첨부파일