Skip to content

Commit 1785706

Browse files
wip
1 parent 3154219 commit 1785706

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/Fields/RichEditor.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,26 @@ public static function getDefaultConfig(): array
2929

3030
public static function make(string $name, ?Field $field = null): Input
3131
{
32+
/**
33+
* @var Input $input
34+
*/
3235

3336
$input = self::applyDefaultSettings(Input::make($name), $field);
3437

35-
// Disable array casting
36-
$input->json(false);
37-
3838
$input = $input->label($field->name ?? null)
3939
->toolbarButtons([$field->config['toolbarButtons'] ?? self::getDefaultConfig()['toolbarButtons']])
4040
->disableToolbarButtons($field->config['disableToolbarButtons'] ?? self::getDefaultConfig()['disableToolbarButtons'])
4141
->default(null)
4242
->placeholder('')
4343
->statePath($name)
4444
->live()
45+
->json(false)
46+
->beforeStateDehydrated(function() {
47+
return ;
48+
})
49+
->saveRelationshipsUsing(function(){
50+
return;
51+
})
4552
->formatStateUsing(function ($state) {
4653
if (empty($state)) {
4754
return null;
@@ -116,7 +123,7 @@ public static function make(string $name, ?Field $field = null): Input
116123

117124
return null;
118125
});
119-
126+
120127
$hideCaptions = $field->config['hideCaptions'] ?? self::getDefaultConfig()['hideCaptions'];
121128
if ($hideCaptions) {
122129
$input->extraAttributes(['data-hide-captions' => 'true']);

0 commit comments

Comments
 (0)