froala editor에서 ajax로 데이터를 가져와 editor에 입력하고 싶습니다.
- 0
-
1
안녕하세요..
froala editor를 사용중에 있습니다.
ajax로 서버측에 데이터를 요청하여 editor에 입력하고 싶어요..
- $(document).on('click', '[data-toggle="edit"]',function (e) {
- var id = $(this).data('id');
- $.ajax({
- type: "GET",
- url: '/cards/'+id+'/get',
- dataType : 'JSON',
- success: function(json) {
- }
- });
- e.preventDefault();
- e.stopPropagation();
- })
- <textarea id="froala_editor"></textarea>
감사합니다..
0
댓글
작성한 댓글 등록하기
자문자답.
html.set 메서드를 사용하면 됩니다.
- $(".selector").froalaEditor('html.set', content);
html.set 그 외 메서드들에 대해서는 froala document를 참고하세요.
https://www.froala.com/wysiwyg-editor/docs/methods
감사합니다
답변 작성
질문에 적합한 답변을 상세히 작성해 주시기 바랍니다.
답변이 찬성되면 태그평판 +2점이 적립, 반대되면 태그평판 -1점 차감됩니다.
답변이 채택되면 태그평판 +10점이 적립됩니다.