
內容簡介
一個 WordPress 外掛,可自動調整並改進 Advanced Custom Fields 中的 wysiwyg 和 textarea 欄位。
功能
自動調整 ACF 群組中 wysiwyg 和 textarea 欄位的大小
在 tinymce 的 iframe 中,將 data-wysiwyg-slug='my-wysiwyg-field' 添加到 body 中,以便您可以使用 editor-styles 樣式化該 iframe 的內容。
限制
目前不支援 ACF Gutenberg Blocks 中的欄位。
用法
與任何其他 WordPress 外掛一樣安裝並啟用
[data-wysiwyg-slug] 將被添加到每個 wysiwyg 欄位!
該插件默認啟用所有 textarea 和 wysiwyg 欄位。您可以通過將類別 no-autosize 添加到欄位中來禁用它。
您可以通過 acf-autosize/enabledByDefault 過濾器將默認行為設置為 false。之後,您可以通過將類別 autosize 添加到單個欄位中重新啟用它。
通過 acf-autosize/wysiwyg/min-height 過濾器設置 wysiwyg 欄位的最小高度。
通過 acf-autosize/enabledInFrontend 過濾器在前端啟用插件。
mu-plugin
acf-autosize-mu.php 是 acf-autosize 的單文件外掛版本,可在您的佈景主題或 mu-plugins 中使用。它包含了 JavaScript 並會自動產生!
開發
在 Github 上查看源代碼 !
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
A wordpress plugin to automatically resize and improve upon wysiwyg and textarea fields in Advanced Custom Fields.
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.
Limitations
Currently does not work on fields inside of ACF Gutenberg Blocks.
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.
The plugin can be enabled in the frontend via acf-autosize/enabledInFrontend-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!
