- probably fix #1199;

This commit is contained in:
Mykyta Synelnikov
2023-06-09 14:53:02 +03:00
parent daed5aa9a1
commit fd1782df79
+16 -2
View File
@@ -882,8 +882,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
$value = $this->get_field_value( $field_data ); $value = $this->get_field_value( $field_data );
add_filter( 'wp_default_editor', array( &$this, 'set_default_editor_fix' ) );
ob_start(); ob_start();
wp_editor( $value, wp_editor(
$value,
$id, $id,
array( array(
'textarea_name' => $name, 'textarea_name' => $name,
@@ -891,14 +894,25 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
'editor_height' => 425, 'editor_height' => 425,
'wpautop' => false, 'wpautop' => false,
'media_buttons' => false, 'media_buttons' => false,
'editor_class' => $class 'editor_class' => $class,
) )
); );
$html = ob_get_clean(); $html = ob_get_clean();
remove_filter( 'wp_default_editor', array( &$this, 'set_default_editor_fix' ) );
return $html; return $html;
} }
/**
* Fix the displaying wp_editor on macOS
*
* @return string
*/
public function set_default_editor_fix() {
return 'html';
}
/** /**
* @param $field_data * @param $field_data