How to use the autosize.update function in autosize

To help you get started, we’ve selected a few autosize examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dy / settings-panel / src / textarea.js View on Github external
setTimeout(() => {
			this.emit('init', input.value)
			autosize.update(input);
		})
github pluto-net / scinapse-web-client / app / components / common / autoSizeTextarea / reduxAutoSizeTextarea.tsx View on Github external
public componentDidUpdate() {
    if (this.textareaDom && this.textareaDom.value.length === 0) {
      autosize.update(this.textareaDom);
    }
  }
github cloudflare / InstantPlugin / app / components / application / demos / nectar-ninja.js View on Github external
export default function runDemo(app) {
  const {attributePicker} = app
  const {embedCodeInput, pluginDetailsForm} = app.refs
  const {locationSelect} = attributePicker.refs

  embedCodeInput.autofocus = false
  embedCodeInput.value = script
  autosize.update(embedCodeInput)
  attributePicker.parseInput()

  locationSelect.value = "body"

  const {option_1} = app.entities

  option_1.title = "Twitter username"
  attributePicker.toggleEntityTracking(option_1.element)

  const fields = {
    "[name='email']": "demo@instantwordpressplugin.com",
    "[name='app[title]']": "Nectar Ninja",
    "[name='app[description]']": "Send website notifications via Twitter!",
    "[name='app[metadata][description]']": `Let users know of new features, deals or downtimes.
Dead-simple, no signup required. Yes, it's free.`
  }
github cloudflare / InstantPlugin / app / components / application / demos / forecast-io.js View on Github external
export default function runDemo(app) {
  const {embedCodeInput, locationSelect, pluginDetailsForm} = app.refs

  embedCodeInput.autofocus = false
  embedCodeInput.value = script
  autosize.update(embedCodeInput)
  app.parseInput()

  locationSelect.value = "body"

  const {option_7, option_8, option_9} = app.entities

  option_7.title = "Latitude"
  option_8.title = "Longitude"
  option_9.title = "Description"

  app.toggleEntityTracking(option_7.element)
  app.toggleEntityTracking(option_8.element)
  app.toggleEntityTracking(option_9.element)

  const fields = {
    "[name='app[title]']": "Forecast.io",
github Esri / storymap-crowdsource / src / app / components / viewerDialogs / socialSharing / ShareLink.babel.js View on Github external
componentDidUpdate(prevProps,prevState) { //eslint-disable-line no-unused-vars
    if (prevState.shareUrl !== this.state.shareUrl) {
      this.selectAllFromNode(this.linkInput);
    } else if (prevState.embed.code !== this.state.embed.code) {
      this.selectAllFromNode(this.embedCodeInput);
    }

    autosize.update(this.embedCodeInput);
  }
github fjordllc / bootcamp / app / javascript / comment.vue View on Github external
this.$nextTick(function() {
        const textarea = document.querySelector(`#js-comment-${this.comment.id}`)
        autosize.update(textarea)
        $(`.comment-id-${this.comment.id}`).trigger('input');
      })
    },
github buildkite / frontend / app / components / shared / FormMarkdownEditorField.js View on Github external
_changed() {
    autosize.update(this.textarea);
    if (this.props.onChange) {
      this.props.onChange();
    }
  }

autosize

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.

MIT
Latest version published 1 year ago

Package Health Score

70 / 100
Full package analysis