acf-autosize

Description

A wordpress plugin to automatically resize and improve upon wysiwyg and textarea fields in Advanced Custom Fields. Please note: Version 2 will automatically apply autosize to all fields. It will be possible to deactivate autosizing via class though.

Features

  • Automatically resize wysiwyg and textarea fields in ACF groups
  • Add data-wysiwyg-slug='my-wysiwyg-field' to the body in tinymce iframes, so you can style those iframe’s contents using editor-styles.

Usage

  • Install and activate like any other wordpress plugin
  • [data-wysiwyg-slug] is added to every wysiwyg field!
  • The plugin is enabled by default on all textareas and wysiwyg fields. You can disable it by adding the class no-autosize to a field.
  • You can set the the default behaviour to false via the acf-autosize/enabledByDefault-filter. After that you can reenable single fields by adding the class autosize.
  • Set min-height of WYSIWYG-fields via acf-autosize/wysiwyg/min-height-filter.

mu-plugin

acf-autosize-mu.php is a single-file drop-in version of acf-autosize for usage in your theme or mu-plugins. It contains the javascript and is autogenerated!

Development

Check out the source code on Github!

Installation

Install and activate like any other wordpress plugin

Reviews

October 21, 2019
Thank you! Every few months I've searched for a solution to this issue but never had the right query I guess. Finally found your plugin through the ACF forum and it's wonderful. Like a current thread here asks for, it'd be nice to have it "on by default" but I'm already thrilled with it.
January 4, 2019
It works like a charm! Just add "autosize" as a class and this plugin does the trick! Thanks to the author!
Read all 6 reviews

Contributors & Developers

“acf-autosize” is open source software. The following people have contributed to this plugin.

Contributors

Translate “acf-autosize” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

2.0.0

  • Enable by default
  • Add acf-autosize/enabledByDefault-filter to enable the inverse behaviour (as in pre 2.0.0)
  • when enabled by default single fields can be disabled by adding no-autosize

1.3.3

  • Fix initialisation on textareas inside repeater or flexcontent fields
  • Make sure prefilled textareas are autosized on initial pageload

1.3.0

  • Add acf-autosize/wysiwyg/min-height-filter to set min-height of wysiwyg-fields
  • Update dependencies to fix security issues

1.2.3

  • Fix issue with WordPress 5.0 and Gutenberg

1.1.2

  • Fix safari issue with position:sticky by externalizing css and adding autoprefixer

1.1.0–1.1.1

  • Make tinymce toolbars sticky
  • Fix bug with double plugin activation

1.0.4

  • Fix README

1.0.3

  • Better documentation
  • Added tinymce iframe>body[data-wysiwyg-slug] feature

1.0.2

  • Added banner and icons

1.0.1

  • First release