alexander-elgin / ta-maxlength Goto Github PK
View Code? Open in Web Editor NEWSet maxlength for textAngular
License: MIT License
Set maxlength for textAngular
License: MIT License
Hi alexander,
ta-maxlength works fine for validating maxlength in textangular, is it possible to validate "maxlength per line".
Regards,
Vishnu
I was able to modify the code to check word count instead
var getContentLength = function() {
var s = angular.element(getEditor()).text() ? angular.element(getEditor()).text().split(/\s+/) : 0; // it splits the text on space/tab/enter
return s ? s.length - 1 : '';
//return angular.element(getEditor()).text().length;
};
Any way of baking this into this directive?
Hey alexander, great directive. I have one question for you. Can this work for customized angular-xeditable directive? I am using this editableTextAngular directive:
angular.module('xeditable').directive('editableTextAngular', ['editableDirectiveFactory',
function(editableDirectiveFactory) {
return editableDirectiveFactory({
directiveName: 'editableTextAngular',
inputTpl: '
and when I try to use your directive it is failing because editor is undefined....
keydown event never work
Hi Alexander,
I'm suffering to limit when I copy-past, cause the doesn't work.
Can you help us?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.