컨텐츠 wangEditor 편집기를 획득 한 후, 양식을 제출 및 콘텐츠 편집자는 그것을 얻을

잠깐은 ------------- 이봐,이 편집기는 매우 아름답습니다 '라고해야하지만. . . . . . . . .

나는 그렇게했다. . . . . . ,

1. 먼저 자신의 편집기 JS 소개

<script th:src="@{/static/assets/js/editorwang.js}"></script>
<script th:src="@{/static/assets/js/jquery.min.js}"></script>
</body>
<script type="text/javascript">
    var E = window.wangEditor
    var editor = new E('#editor')
    // 或者 var editor = new E( document.getElementById('editor') )
    editor.create()
    //设置文本内容

    editor.txt.html($('#noplay').text())
    $('#submitedit').click(function () {
        alert(editor.txt.html())
        $('#text1').text(editor.txt.html());
        alert($('#text1').text())
    })
</script>

2.이 내가 사업부에 쓴 것입니다, 사실, 숨겨진 DIV, 다음 에디터로 다시 반향

<div class="am-form-group">
                                <label for="editor" class="am-u-sm-3 am-form-label">文章内容</label>
                                <div id="editor" placeholder="请输入文稿内容" class="am-u-sm-9">
                                </div>
                                <div style="display: none" name="newscontent">
                                    <textarea id="text1" style="width:100%; height:200px;" th:value="${selnews.newscontent}" name="newscontent"></textarea>
                                </div>
                                <div style="display: none" id="noplay">
                                    '这里面是你要回显的内容'
                                </div>
                            </div>

 

게시 37 개 원래 기사 · 원의 찬양 (12) · 전망 6465

추천

출처blog.csdn.net/weixin_38960774/article/details/104600965