angularjs-autogrow: AngularJS 1.x directive for auto-grow / auto-resize of textarea elements.

  • AngularJS directive for auto-grow / auto-resize of textarea elements on typing.
  • A full explanation of the code can be found on my blog post along with a jQuery plugin and an Angular directive with this technique.
  • Include file in section of the HTML:

    It’s also recommended to add those two CSS properties to make things stable:

    Add the directive to the textarea element:

    You can limit the auto-growing of the textarea element by using attribute:

    You can set the initial line number using attribute:

angularjs-autogrow – AngularJS 1.x directive for auto-grow / auto-resize of textarea elements.

@npmaddict: angularjs-autogrow: AngularJS 1.x directive for auto-grow / auto-resize of textarea elements.

We recommend upgrading to the latest Safari, Google Chrome, or Firefox.

AngularJS directive for auto-grow / auto-resize of textarea elements on typing.

Works in all cases: expands on line breaks and word breaks.

Allows limitation of auto-growing so a scrollbar will appear after X lines of content.

A full explanation of the code can be found on my blog post along with a jQuery plugin and an Angular directive with this technique.

section of the HTML:

dependency on your angular module:

It’s also recommended to add those two CSS properties to make things stable:

Add the directive to the textarea element:

attribute:

attribute:

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

GitHub

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.