Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple 'Hello World' type setup of TextAngular fails

Tags:

angularjs

Trying to use TextAngular module with a simple example as possible, but it does not look correct.

First the editor textarea is only 1 line high. When I try to use the editor I can edit mulitple lines, but lines after the first line then "merges" with other html elements below the editor-area (see plunker how it looks).

Like this:

<body ng-app="myApp">
  <div ng-controller="AppCtrl">
      <div text-angular ng-model="message"></div>
  </div>
  Some text below...
</body>

and with controller:

var app = angular.module('myApp', ['textAngular']);

app.controller('AppCtrl', function($scope) {
  $scope.message = "Default message";
});

See it all in plunker http://plnkr.co/edit/t1YIpwLjPo7yNfVTWPAt?p=preview

What I am doing wrong for this highly simple example?

like image 497
EricC Avatar asked Mar 20 '14 17:03

EricC


2 Answers

I ran into this issue also. Need to add the following class to your styles:

  .ta-editor {
    min-height: 300px;
    height: auto;
    overflow: auto;
    font-family: inherit;
    font-size: 100%;
    margin:20px 0;
 }
like image 71
Rob Avatar answered Nov 14 '22 05:11

Rob


You can add this link instead :

    <link href="https://cdnjs.cloudflare.com/ajax/libs/textAngular/1.5.0/textAngular.css" rel="stylesheet"/>
like image 22
Bajju Avatar answered Nov 14 '22 05:11

Bajju