Support Forum
I noticed some bug reports on the WYSIWYG editor, so I am not 100% sure if this already has been reported.
I can't edit WYSIWYG content in text mode:
I created the following custom field via the visual editor:
<?php
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
function your_prefix_function_name( $meta_boxes ) {
$prefix = '_akdev_';
$meta_boxes[] = [
'title' => __( 'Page Banner', 'your-text-domain' ),
'id' => 'page-banner',
'post_types' => ['page'],
'include' => [
'relation' => 'OR',
'template' => ['template_page-banner.php'],
],
'validation' => [
'rules' => [
$prefix . '_akdev_cta_text' => [
'required' => true,
],
$prefix . '_akdev_cta_url' => [
'url' => true,
],
],
],
'tabs' => [
'_akdev_text_tab' => [
'label' => 'Text',
'icon' => 'text',
],
'_akdev_cta_tab' => [
'label' => 'Call to action',
'icon' => 'admin-links',
],
],
'fields' => [
[
'id' => $prefix . 'banner_text',
'type' => 'wysiwyg',
'tab' => '_akdev_text_tab',
],
[
'id' => $prefix . 'banner_cta',
'type' => 'group',
'fields' => [
[
'name' => __( 'Text', 'your-text-domain' ),
'id' => $prefix . 'cta_text',
'type' => 'text',
'placeholder' => __( 'Call to action', 'your-text-domain' ),
'required' => true,
],
[
'name' => __( 'Link', 'your-text-domain' ),
'id' => $prefix . 'cta_url',
'type' => 'url',
'placeholder' => __( 'https://example.com', 'your-text-domain' ),
'required' => true,
],
],
'tab' => '_akdev_cta_tab',
],
],
];
return $meta_boxes;
}
the gif is to fast, this one should visualize it better https://ibb.co/1LD8D2q
Hi,
I do not see the issue on my local site, screen record https://share.getcloudapp.com/DOuqGL70.
Please try to switch to the tab Text and re-check this issue.
That's strange I can't reproduce it. I will reply if the error occurs again.