File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
docs/content/1_docs/4_form-fields Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,32 @@ class ProjectController extends BaseModuleController
161161 ]);
162162 }
163163}
164+ ```
165+ ### Medias
166+
167+ If your json repeater contains media formField, you need to define the
168+ ` mediasParams ` at ` config/twill.php ` under ` repeaters.crops ` or ` block_editor.crops ` .
169+
170+ ```
171+ 'repeaters' => [
172+ 'crops' => [
173+ ‘your-media-field-name’ => [
174+ …
175+ ]
176+ ],
177+ ]
178+ ```
179+
180+ OR
181+ ```
182+ 'block_editor' => [
183+ 'crops' => [
184+ ‘your-media-field-name’ => [
185+ …
186+ ]
187+ ],
188+ ]
189+
164190```
165191
166192| Option | Description | Type | Default value |
Original file line number Diff line number Diff line change @@ -310,7 +310,8 @@ public function readBlocksFromDirectory(
310310 public function getAllCropConfigs ($ prefixKey = false ): array
311311 {
312312 if (! $ this ->cropConfigs ) {
313- $ this ->cropConfigs = config ()->get ('twill.block_editor.crops ' );
313+ $ this ->cropConfigs = config ()->get ('twill.block_editor.crops ' )
314+ + (config ()->get ('twill.repeaters.crops ' ) ?? []);
314315
315316 /** @var Block $block */
316317 foreach ($ this ->getBlockCollection () as $ block ) {
You can’t perform that action at this time.
0 commit comments