0

I am using the xeditable plugin in angular js.It has e-formclass attribute which provides class into form and its work fine with textbox but when I am using with textarea it's not working.

Textarea

var app = angular.module("app", ["xeditable"]);

app.run(function(editableOptions) {
  editableOptions.theme = 'bs3';
});

app.controller('Ctrl', function($scope, $filter) {
  $scope.user = {
    desc: 'Awesome user \ndescription!'
  };
});
div[ng-app] { margin: 50px; }
<link href="https://vitalets.github.io/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"/>
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-sanitize.min.js"></script>
<script src="https://vitalets.github.io/angular-xeditable/dist/js/xeditable.js"></script>



<h4>Angular-xeditable Textarea (Bootstrap 3)</h4>
<div ng-app="app" ng-controller="Ctrl">
  <a href="#" editable-textarea="user.desc" e-formclass="clss1" e-rows="7" e-cols="40">
    <pre>{{ user.desc || 'no description' }}</pre>
  </a>
</div>

and Here is snippet for Textbox

var app = angular.module("app", ["xeditable"]);

app.run(function(editableOptions) {
  editableOptions.theme = 'bs3';
});

app.controller('Ctrl', function($scope) {
  $scope.user = {
    name: 'awesome user'
  };
});
div[ng-app] { margin: 50px; }
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://vitalets.github.io/angular-xeditable/dist/css/xeditable.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-sanitize.min.js"></script>
<script src="https://vitalets.github.io/angular-xeditable/dist/js/xeditable.js"></script>




<h4>Angular-xeditable Text (Bootstrap 3)</h4>
<div ng-app="app" ng-controller="Ctrl">
  <a href="#" e-formclass="hello" editable-text="user.name">{{ user.name || 'empty' }}</a>
</div>

Textbox Textarea

Kushal Suthar
  • 423
  • 6
  • 21
  • Your textarea example (above) worked fine for me in Firefox - I clicked the text, was able to edit it. I hit the save button and my change was 'saved'. What do you mean exactly by "not working"? – K Scandrett Sep 13 '17 at 03:50
  • No, its working fine but I am talking about `e-formclass` attribute which has the functionality to add class into form. [here](https://vitalets.github.io/angular-xeditable/#text-customize) you will find the reference – Kushal Suthar Sep 13 '17 at 05:31

0 Answers0