Wordpress editor bug (w/laravel-themosis)

26 Views Asked by At

I recently encountered a display bug in my WordPress editors sections when I started to make them. In addition, the text entered doesn't work.. I really have no idea of where it comes from, but here is a pic of my issue and the code related. Hope someone could help me :/

first tab : visual second tab : text

Thank you in advance for your time :)

Here is my code :

<?php

use Themosis\Support\Facades\Field;
use Themosis\Support\Facades\Metabox;
use Themosis\Support\Section;

Metabox::make('allees', 'page')

    ->add(new Section('intro', 'Introduction', [
        Field::media('intro_img', ['label' => 'Bannière']),
        Field::text('intro_title_green', ['label' => 'Titre principale (en vert)']),
        Field::text('intro_title_gray', ['label' => 'Titre principale (en gris)']),
        Field::editor('intro_text', [
            'label' => 'Texte',
            'settings' => [
                'teeny'=> true,
                'tinymce' => [
                    'allow_html_in_named_anchor' => true,
                    'forced_root_block' => 'div',
                    'remove_trailing_brs' => false,
                ]
            ]
        ]),
        Field::text('intro_button', ['label' => 'Boutton']),
    ]))



    ->setTemplate('allees')
    ->setPriority('high')
    ->setTitle('Configuration de la page')
    ->addTranslation('done', 'Sauvegarde réussie')
    ->addTranslation('error', 'Une erreur s\'est produite pendant la sauvegarde')
    ->addTranslation('saving', 'Sauvegarde en cours')
    ->set();```

Tried to make an editor input. It appears but not working and not displaying correctly.
0

There are 0 best solutions below