-
-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customized editableTextAngular #567
Comments
Your inputTpl above is empty. Shouldn't it be |
For some reason it is showing is empty but I have it as : text-angular |
If I add e-ta-max-text="5" it allows me to add more than 5 characters but when click on Save button it does not get binded to div but how can i controle that? I mean to have function when click on Save button to check if I have more than 5 and show some message? Here is how I use it: |
When you add |
Hey @ckosloski I am not sure why I cannot run x-editable in this plunker: https://plnkr.co/edit/CKZ9DeHee4pk7GUjVim2?p=preview sorry, I am not so good with plunker. To answer your question above: When I add e-ta-max-text I see atribute in my text-angular. When i click on href and add more than 5 characters and click on Save button that text is not binded to div tag which is good, it means e-ta-max-text is working. My question was how to check this on href click in some function for example and show message above this x-editable? |
What I meant was how to have control on Save button after I enter text and click on that button. And how to check if I have over max character error to show some message... |
If you look at your console of your plunker, you will see: |
Hey @ckosloski I got read of the errors.. I added xeditable.js file and modified editableTextarea in editableTextAngular. However I cannot show this editableTextAngular href....You have some idea why is that? |
See if this helps you. Click edit, type more than 5 characters, see error appear. |
Omg.. @ckosloski this was exactly what i needed!!! Thank you so much for your help!!! |
ok, then please close this issue. |
Hey @ckosloski I tried your way for max length and I am getting this message that character limit is exteneded... However after I open editable-text-angular for second or third etc.. time I am getting this error:
I tried to open inspect element amd I see editable-text-angular is there twice. I was researching on some issues for this and found this 👍 but I tried with {{$index]} and it was same.... Can you help me with this? |
My code:
|
What version of xeditable are you using? |
|
Please use the latest version 0.5.0. There were some changes in a recent version that fixed some of these scope issues. |
@ckosloski I updated to 0.5.0 and this errors were removed... Thank you so much for your quick responses and help!!! |
Can I use e-maxlength with customized xeditable text angular directive? I am using this directive:
angular.module('xeditable').directive('editableTextAngular', ['editableDirectiveFactory',
",function(editableDirectiveFactory) {
return editableDirectiveFactory({
directiveName: 'editableTextAngular',
inputTpl: "
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 tried to use e-max-length but it is not working... I tried also to use this directive https://github.com/alexander-elgin/ta-maxlength but again no success...
The text was updated successfully, but these errors were encountered: