小编Aya*_*jee的帖子

如何获取Angular JS变量中SunEditor(Richtextbox)的内容

我将SunEditor与 AngularJS 一起使用,我的目的是获取富文本框的内容并将其传递给 Angular JS,我尝试过 ng-model 但它似乎不起作用。有没有任何解决方案可以获取SunEditor富文本框中写入的所有html内容?我想要获取文本以及 html 内容。

\n\n
       <!DOCTYPE html>\n<html lang="en">\n<head>\n    <meta charset="UTF-8">\n    <meta name="viewport" content="width=device-width, initial-scale=1">\n    <meta name="author" content="https://github.com/JiHong88" />\n    <meta name="keywords" content="wysiwyg,editor,javascript,suneditor,wysiwyg eidtor,rich text editor,html editor,contenteditable,\xec\x9c\x84\xec\xa7\x80\xec\x9c\x84\xea\xb7\xb8 \xec\x97\x90\xeb\x94\x94\xed\x84\xb0 \xec\x9b\xb9\xec\x97\x90\xeb\x94\x94\xed\x84\xb0">\n    <meta name="description" content="Pure javascript wysiwyg web editor" />\n    <title>SunEditor</title>\n    <!-- suneditor -->\n    <link href="../dist/css/suneditor.min.css" rel="stylesheet" type="text/css">\n    <!-- sample css -->\n    <link rel="stylesheet" href="./css/bootstrap.css" media="all">\n    <link rel="stylesheet" href="./css/sample.css" media="all">\n    <script src="js/angular.min.js"> </script>\n    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n<script>\n    $(document).ready(function(){\n        $("button").click(function(){\n            var comment = $.trim($(".tabcontent").val());\n\n                // Show alert dialog if value is …
Run Code Online (Sandbox Code Playgroud)

richtextbox angularjs suneditor

2
推荐指数
1
解决办法
6394
查看次数

标签 统计

angularjs ×1

richtextbox ×1

suneditor ×1