Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add settings to enable visual or text editor for TinyMCE #6179

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
18 changes: 14 additions & 4 deletions classes/fields/wysiwyg.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,25 @@ public function options() {
'dependency' => true,
),
'editor_options' => array(
'label' => __( 'Editor Options', 'pods' ),
'type' => 'boolean_group',
'depends-on' => array( static::$type . '_editor' => 'tinymce' ),
'boolean_group' => array(
'label' => __( 'Editor Options', 'pods' ),
'type' => 'boolean_group',
'depends-on' => array( static::$type . '_editor' => 'tinymce' ),
'boolean_group' => array(
static::$type . '_media_buttons' => array(
'label' => __( 'Enable Media Buttons', 'pods' ),
'default' => 1,
'type' => 'boolean',
),
static::$type . '_tinymce' => array(
'label' => __( 'Enable TinyMCE (Visual)', 'pods' ),
'default' => 1,
'type' => 'boolean',
),
static::$type . '_quicktags' => array(
'label' => __( 'Enable Quicktags (Text)', 'pods' ),
'default' => 1,
'type' => 'boolean',
),
),
),
static::$type . '_editor_height' => array(
Expand Down
4 changes: 3 additions & 1 deletion ui/js/dfv/src/config/prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ export const FIELD_PROP_TYPE = {
wysiwyg_convert_chars: PropTypes.string,
wysiwyg_editor: PropTypes.string,
wysiwyg_editor_height: NUMBER_OR_NUMBER_AS_STRING,
wysiwyg_media_buttons: PropTypes.string,
wysiwyg_media_buttons: BOOLEAN_ALL_TYPES,
JoryHogeveen marked this conversation as resolved.
Show resolved Hide resolved
wysiwyg_tinymce: BOOLEAN_ALL_TYPES,
wysiwyg_quicktags: BOOLEAN_ALL_TYPES,
wysiwyg_oembed: PropTypes.string,
wysiwyg_repeatable: BOOLEAN_ALL_TYPES,
wysiwyg_wpautop: PropTypes.string,
Expand Down