tui 편지쓰기 페이지에 적용하기

1. tui git 페이지에 나와 있는 방버대로 bower 이용해서 패키지 설치 후 dependency 적용 후 초기화 하기

  var editor = new tui.Editor({
          el: document.querySelector('#editSection'),
          initialEditType: 'markdown',
          previewStyle: 'vertical',
          height: '500px',
          initialValue: '# Header'
        });

이 방법으로는 되는 데, 아래 jquey를 이용한 방법으로는 is not a function 에러가 난다. 아직 해결 못함
=> 창윤님의 도움으로 해결. 파일인풋 하려고 jquery를 썼는 데, 버전차이가 생겨서 안됐던 것.

    $('#editSection').tuiEditor({
          initialEditType: 'markdown',
          previewStyle: 'vertical',
          height: '300px'
          });

2. tui editor에서 값 얻어오기

editor 라고 선언한 변수에서 값을 가져올 수 있다.
markdown을 기본 에디터로 설정하고 # Header 라고 작성하였다.


editor.getValue()
"# Header"

editor.getHtml()
"<h1>Header</h1>