【发布时间】:2014-08-13 11:15:49
【问题描述】:
我正在使用 AngularJS 和 TinyMCE 开发一个 ASP.net MVC 应用程序。
我需要向用户显示一个所见即所得的文本区域以获取输入。
我无法将初始值绑定到文本区域。需要帮忙。以下是我所做的。
<script type="text/javascript">
tinyMCE.init({
mode: "textareas",
theme: "advanced",
theme_advanced_path: false,
theme_advanced_buttons1: "fontselect,|,bold,italic,underline,|,fontsizeselect,|,forecolor,backcolor",
theme_advanced_buttons2: "|,justifyleft,justifycenter,justifyright,|,link,unlink,|,bullist,numlist,|,code",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: true,
});
</script>
查看:
<textarea data-ng-model="selectedProduct.ProductText">
{{selectedProduct.ProductText}}
</textarea>
【问题讨论】:
标签: angularjs tinymce tinymce-3