Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ember-cli-textarea-autosize
Advanced tools
An Ember addon that provides a textarea component that adjusts its height according to the supplied text. Included are also several mixins that can be used to ensure `autofocus` works properly, focused text inputs have their text selected, and ctrl+enter
Readme
An Ember addon that provides a textarea component that adjusts its
height according to the supplied text. Included are also several
mixins that can be used to ensure autofocus
works properly,
focused text inputs have their text selected, and ctrl+enter will
submit the nearest form.
This addon uses the autosize.js
library from Jack Moore: https://github.com/jackmoore/autosize.
ember install ember-cli-textarea-autosize
yarn add -D ember-auto-import webpack
ember-auto-import
is being leveraged to bring in Jack Moore's autosize
library as well as some keyevent
constants. You don't need to do anything special but make sure your Ember app
has ember-auto-import
2+ installed (which also requires you to install the latest webpack
).
The demonstration web application can be found here: http://ember-cli-textarea-autosize.cybertooth.io/.
This addon gives you access to the following component:
textarea-autosize
- an extension of the Ember.TextArea that
produces a <textarea>
that grows in height to fit the supplied
content.This textarea component extends the ember-cli-text-support-mixins
add-on's
text-area
component. This text area does not accept a block, instead always
pass your value to the value attribute
.
<TextareaAutosize @value='someModel.largeTextAttribute' />
If you need to set the minimum height of the <textarea>
, set the
rows
property:
<TextareaAutosize rows='6' ... />
...or you can specify the min-height
property
<TextareaAutosize min-height='200px' ... />
The <textarea>
will continue to grow indefinitely unless you set the
max-height
property:
<TextareaAutosize max-height='500px' ... />
The <TextareaAutosize />
automatically:
autofocus=true
feature works across template transitions.CTRL+ENTER
is
pressed.ember-cli-text-support-mixins
Add-OnBefore 1.1 the TriggerFocus
, FocusSelectsText
, and CtrlEnterSubmitsForm
mixins
were available in this add-on. They are no longer here, and if you were using them your
code breaks.
You should be able to easily move your code over to the ember-cli-text-support-mixins
variation:
// import TriggerFocus from 'ember-cli-textarea-autosize/mixins/trigger-focus'
// ...now becomes ...
import TriggerFocus from 'ember-cli-text-support-mixins/mixins/trigger-focus';
// import FocusSelectsTextMixin from 'ember-cli-textarea-autosize/mixins/focus-selects-text';
// ... now becomes ...
import FocusSelectsText from 'ember-cli-text-support-mixins/mixins/focus-selects-text';
// import CtrlEnterSubmitsFormMixin from 'ember-cli-textarea-autosize/mixins/ctrl-enter-submits-form';
// ... now becomes ...
import CtrlEnterSubmitsForm from 'ember-cli-text-support-mixins/mixins/ctrl-enter-submits-form';
Head over here for the mixin documentation.
See the Contributing guide for details.
This project is licensed under the MIT License.
FAQs
An Ember addon that provides a textarea component that adjusts its height according to the supplied text. Included are also several mixins that can be used to ensure `autofocus` works properly, focused text inputs have their text selected, and ctrl+enter
The npm package ember-cli-textarea-autosize receives a total of 134 weekly downloads. As such, ember-cli-textarea-autosize popularity was classified as not popular.
We found that ember-cli-textarea-autosize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.