easylogic / gnuboard5-summernote

그누보드5 를 위한 Summernote 에디터 플러그인
MIT License
6 stars 1 forks source link

임시 저장된 글 불러오려면 어떻게 해야할까요? #1

Closed illite closed 9 years ago

illite commented 9 years ago

그누보드 기본 스킨에서 제목 옆에 임시저장된 글 불러오기가 있습니다.

자동 저장되고 불러오고 하는건데 둘다 되지 않습니다.

bbs/autosave.js 건들어야 하는데

어떻게 코드를 고쳐야할지 모르겠어요.

easylogic commented 9 years ago

아 ~ 임시저장글이 있군요.

미쳐 생각을 못했습니다.

이 부분은 제가 소스 좀 더 확인하고 말씀드릴게요 ~

easylogic commented 9 years ago

summernote 플러그인중에 스크립트 오류 나는 부분이 있어서

제거하였습니다.

master 바로 다운로드 하시면 됩니다.

easylogic commented 9 years ago

임시글 저장 같은 경우는 autosave 가 정상적으로 되는것 같긴 한데.

리스트를 표시를 못하네요.

easylogic commented 9 years ago

auto save 의 경우 하드코딩으로 소스를 조금 수정해야하네요.

적용되면 알려드리겠습니다.

easylogic commented 9 years ago

auto save 적용 하실려면 아래 두가지를 적용해주시면 됩니다.

일단 /js/autosave.js 를 열어서

function autosave () {
    ... 
      // summernote data 설정 
      } else if (g5_editor.indexOf("summernote") != -1 ) {
            this.wr_content.value = $("#wr_content").code();
     }
   ...
}

// autosave 내용 로드 
 $(document).on( "click", ".autosave_load", function(){
    ... 
     // summernote 내용 로드 
     } else if (g5_editor.indexOf("summernote") != -1 ) {
                $("#wr_content").code(content);
     }
     ... 
}

이쪽은 editor 가 하드코딩 되어 있네요.

2가지를 추가 하시면 autosave 도 그대로 사용가능합니다.

easylogic commented 9 years ago

그누보드 기본 패키지에 추가 할 수가 없어서 그냥 이대로 써야할 듯 합니다.

illite commented 9 years ago

답변 감사합니다 아주 잘 됩니다.ㅎㅎ