textAngular Error: An Editor with name "title" already exists #1384
Description
I am using customized editable-text-angular like this:
angular.module('xeditable').directive('editableTextAngular', ['editableDirectiveFactory',
function(editableDirectiveFactory) {
return editableDirectiveFactory({
directiveName: 'editableTextAngular',
inputTpl: <div text-angular></div>
,
addListeners: function() {
var self = this;
self.parent.addListeners.call(self);
// submit textarea by ctrl+enter even with buttons
if (self.single && self.buttons !== 'no') {
self.autosubmit();
}
},
autosubmit: function() {
var self = this;
self.inputEl.bind('keydown', function(e) {
if ((e.ctrlKey || e.metaKey) && (e.keyCode === 13)) {
self.scope.$apply(function() {
self.scope.$form.$submit();
});
}
});
}
});
}
]);
I want to use e-ta-max-length fir showing error message when user go over limit. I succeed to show the message However after I open editable-text-angular for second or third etc.. time I am getting this error:
angular.js:11706 textAngular Error: An Editor with name "title" already exists <div text-angular="" ta-max-text="5" name="title" class="editable-input ng-pristine ng-untouched ng-valid ng-isolate-scope ta-root" ng-model="$data">
I tried with this solution:
but same agian...
here is my view: