尝试使用TextAngular模块尽可能使用一个简单的示例,但它看起来不正确.
首先,编辑textarea只有1行高.当我尝试使用编辑器时,我可以编辑多行,但是第一行之后的行然后与编辑器区域下面的其他html元素“合并”(请参阅plunker它的外观).
像这样:
<body ng-app="myApp"> <div ng-controller="AppCtrl"> <div text-angular ng-model="message"></div> </div> Some text below... </body>
和控制器:
var app = angular.module('myApp',['textAngular']); app.controller('AppCtrl',function($scope) { $scope.message = "Default message"; });
在plunker http://plnkr.co/edit/t1YIpwLjPo7yNfVTWPAt?p=preview中查看所有内容
我为这个非常简单的例子做错了什么?
解决方法
我也碰到了这个问题.需要在样式中添加以下类:
.ta-editor { min-height: 300px; height: auto; overflow: auto; font-family: inherit; font-size: 100%; margin:20px 0; }