Skip to content

textAngular Error: An Editor with name "title" already exists #1384

Closed
@bmickoski

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:

#240

but same agian...

here is my view:

*Finding: *Observation:
Click to add the Finding Click to edit the Observation
Too much text!
Save Cancel
The Finding is a required field
The Observation is a required field

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions