Thank you for your reply, @bcworkz. It was very helpful to me.
I managed to add a new metabox with a rich text editor with the following code, but I can’t do it with the already created metabox. Would you know how to do it with the existing metaboxes?
function wporg_add_custom_box() {
$screens = [ 'post', 'wporg_cpt' ];
foreach ( $screens as $screen ) {
add_meta_box(
'my_metabox_id', // Unique ID
'my_metabox', // Box title
'wporg_custom_box_html', // Content callback, must be of type callable
$screen // Post type
);
}
}
add_action( 'add_meta_boxes', 'wporg_add_custom_box' );
function wporg_custom_box_html( $post ) {
$args = array('quicktags' => false);
wp_editor( 'Welcome to WP' , 'test-editor', $args );
}