amidesfahani/filament-tinyeditor

@js error

Closed this issue · 0 comments

Hello there!

Lets say there is a filament-tinyeditor.profiles.custom profile config and it has a property shown below.

'custom_configs'   => [
    'formats' => [
        'underline' => [
            'class' => 'underline'
        ]
    ],
],

The problem is a double encoding problem like => String -> Json -> Json

Screenshot 2024-03-18 at 12 15 17

Solution:

Solution1: getCustomConfigs() function should return an array

public function getCustomConfigs(): string

Solution2: @js($getCustomConfigs()) => {{ $getCustomConfigs() }} in tiny-editor.blade.php view file.

custom_configs: @js($getCustomConfigs())