标签: suneditor

如何获取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
查看次数

如何在 ReactJS 应用程序中显示 SunEditor 创建的数据

我刚刚开始使用 SunEditor,到目前为止,我已成功将其添加到 React 组件中,并在单击“保存”时将生成的文档存储在 mongoDB 中。到目前为止,战斗就成功了一半。现在我想渲染存储的文档,并且我从同一组件中的数据库返回数据,但是当我渲染它时,所有 HTML 都会被显示(参见图片)。我很难找到有关正确显示此数据的文档。有谁知道这样做的正确方法是什么?

截屏

reactjs suneditor

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

标签 统计

suneditor ×2

angularjs ×1

reactjs ×1

richtextbox ×1