themosis / framework

The Themosis framework core.
https://framework.themosis.com/
GNU General Public License v2.0
671 stars 121 forks source link

Editor field settings in a metabox context #767

Closed jlambe closed 2 years ago

jlambe commented 4 years ago

Description

Trying to load custom editor (tinymce) settings on the Field::editor() when used within a Metabox. "WordPress" settings seem to be used but when passing custom TinyMce settings to the tinymce property, nothing happen.

Steps to reproduce

Define an editor field within a metabox context like so:

Metabox::make('infos, 'page')
    ->setTitle(__('Informations, APP_TD))
    ->add(Field::editor('contact_infos', [
        'label' => __('Text', APP_TD),
        'settings_js' => [
            'tinymce' => [
                'toolbar1' => 'styleselect | bold italic | link'
            ]
        ]
    ]))
    ->set();

Expected behavior

A customized TinyMce editor field with pre-defined buttons.