포럼

Froala Editor에 대한 사용의견을 남기는곳 입니다.
데모는 edit mode demo, inline mode demo에서 체험해 보실 수 있습니다.

제목 부분 subject의 값을 글 저장시에 어떻게 넘기나요?

테스트 버전으로 테스트중에 있습니다.
모바일버전 툴바, PC버전 툴바 따로 적용해서 만족스럽습니다.
그런데,
var editor = new FroalaEditor('#froalaEditor', {
.....툴바 설정값들 나열..

imageUploadURL: 'https://xxxx.kr/file_upload/board_img',

        fileUploadURL: 'https://xxxx.kr/file_upload/inline_files',


    saveParam: 'content',

    saveURL : $("#frmBoardWrite").attr("action"),

    saveMethod: 'POST',

    saveParams: {board_id:$("#hidBoardID").val(), isNotice:$("#selectIsNotice").val(), boardSubject:$("#inputBoardSubject").val(), userID:$("#inputUserID").val(), idx:$("#hidIDX").val() },


    events: {

      'save.before': function () {

        // Before save request is made.

        if (editorAction == true) {

          if ($("#inputBoardSubject").val().length < 2) {

            $("#errSubject").text('게시물 제목을 최소 2자 이상 입력해 주세요.');

            $("#inputBoardSubject").focus();

            return false;

          }


          if ($("#inputUserID").val().length < 2) {

            $("#errUserID").text('작성자를 최소 2자 이상 입력해 주세요.');

            $("#inputUserID").focus();

            return false;

          }


          if ($("#inputUserPassword").val().length < 4) {

            $("#errUserPassword").text('글 작성 패스워드를 최소 4자 이상 입력해 주세요.');

            $("#inputUserPassword").focus();

            return false;

          }

        }


      },


      'save.after': function () {

        if (editorAction == true) {

          var mode = $("#hidMode").val();

          if (mode == "Write") {

            window.location.href='/xxxxx/board/lists/'+$("#hidBoardID").val();

          } else {

            var board_id = $("#hidBoardID").val();

            $("#frmBoardWrite").attr("action", "/xxxxx/board/lists/"+board_id).submit();

          }

        }



      },


      'save.error': function () {

        // Do something here.

        console.log('저장 에러시..');

      }

    }
이렇게 작성을 하였는데요...
글을 쓰고 있으면, 글 작성중에, 'save.before' 이벤트가 자동으로 호출이 됩니다.
그리고, saveParams에 입력한 값들이 다 잘 넘어가는데, boardSubject라는 항목으로 설정한 값만 누락되어서 넘어갑니다. 제목 영역이며, 받는 부분에서도 boardSubject로 잘 받고 있습니다만... 나머지 파마미터값들은 다 잘 받는데.. 오직 제목만 못 받아서 공란이 되는 증상이 있습니다.

그리고, 글을 수정시에도, 제목에 "1234"가 원래 제목이었는데, "2345"로 변경을 해도, 넘어오는 값은 기존 "1234"가 넘어옵니다.

아무리 봐도 오류를 못 찾아서, 문의 드려 봅니다.
#inputBoardSubject라는 ID는 페이지 전체에 한개밖에 없습니다.
저장페이지에서도 boardSubject로 제대로 받아 주고 있습니다.

saveParams: {board_id:$("#hidBoardID").val(), isNotice:$("#selectIsNotice").val(), boardSubject:$("#inputBoardSubject").val(), userID:$("#inputUserID").val(), idx:$("#hidIDX").val() },

Profile

2개의 Comment

Profile
라르게덴
2019.08.22

죄송하지만 이 부분은 제가 답변 드릴 내용이 아닌 것 같습니다.

하물며 froala editor v3.0에서 생기는 문제도 아닌 것 같습니다.

save.before 에서 console.log가 잘 찍히는지 디버깅해보시길 바랍니다.

'save.before': function () {
        // Before save request is made.
        console.log($("#inputBoardSubject").val());
        //..
}
Profile
도담이
2019.08.23

예. 답변 주셔서 감사합니다.
이것 저것 확인해 보도록 하겠습니다.
감사합니다. 

에디터
No. Subject Author Date
제목 부분 subject의 값을 글 저장시에 어떻게 넘기나요? 2 도담이 2019.08.22
138 질문 드립니다. 3 질문 드립니다 2019.07.24
137 edif.off 적용 시에 링크, 이미지, 동영상 등 클릭 문제 3 이승호 2019.07.02
136 프로알라 키 문의 드려요 4 레아엘 2019.05.23
135 프로알라 에디터 모바일 사진 업로드 오류 7 indend007@naver.com 2019.05.19
134 혹시 코드보기를 코드펜처럼 젠코딩?이 된다거나 하는 그런 플러그인은 없을까요. 2 profile 이온디 2019.04.19
133 툴바 이상 현상 1 블랙필드 2019.04.11
132 너무 감사합니다. 1 profile 이온디 2019.04.07
131 라이센스 구입 및 테스트 절차 5 김완성 2019.03.23
130 질문드립니다~ 3 profile 황세환 2019.03.05
129 에디터 관련 문의드립니다 1 norte13 2019.03.04
128 에디터 문의 드립니다. 3 에디터찾아삼만리 2019.01.10
127 동영상 업로드 관련 문의 1 문상필 2018.12.21
126 동영상 플레이어 테스터 2018.12.21
125 xe3도 혹시 지원가능한가요? 1 profile 이온디 2018.12.10
124 변경내역 2 profile novelic 2018.11.24
123 질문 드립니다. 2 profile JooSung 2018.11.23
122 안녕하세요 라이센스 구매관련 문의드립니다. 1 leeyuno 2018.11.14
121 혹시 라이센스 도메인 변경이 가능할까요~? 1 라미아뮤직 2018.10.16
120 캐시 재설정하면 에디터가 안 뜨는 경우가 발생합니다 3 profile 이온디 2018.08.15
Find Account
  • Find Account with Email address

    Please input the email address you have entered during the registration and we will send your account info to this email address.

  • Email

    Email address format is invalid.

  • Request for Activation Mail

    You can request for the activation email if you have not activated yet.

  • Email

    Email address format is invalid.