* reviewed and fixed iframe height when HTML formatted textarea is used;

This commit is contained in:
Mykyta Synelnikov
2024-10-03 14:38:51 +03:00
parent 27cbebbe3e
commit 90413c32e5
6 changed files with 19 additions and 13 deletions
+1 -1
View File
@@ -2805,7 +2805,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
'media_buttons' => false,
'wpautop' => false,
'editor_class' => $this->get_class( $key, $data ),
'editor_height' => $data['height'],
'editor_height' => absint( $data['height'] ),
'tinymce' => array(
'toolbar1' => 'formatselect,bullist,numlist,bold,italic,underline,forecolor,blockquote,hr,removeformat,link,unlink,undo,redo',
'toolbar2' => '',
+1 -2
View File
@@ -261,8 +261,7 @@ function um_profile_field_filter_hook__textarea( $value, $data ) {
}
if ( ! empty( $data['html'] ) ) {
$height = isset( $data['height'] ) && absint( $data['height'] ) > 0 ? absint( $data['height'] ) : '';
return '<iframe class="um-textarea-html-value" onload="resizeIframe(this)" data-height="' . $height . '" title="' . esc_attr( $data['label'] ) . '" srcdoc="' . wp_kses_post( esc_attr( $value ) ) . '"></iframe>';
return '<iframe class="um-textarea-html-value" onload="UM.frontend.iframe.resize(this);" title="' . esc_attr( $data['label'] ) . '" srcdoc="' . wp_kses_post( esc_attr( $value ) ) . '"></iframe>';
}
$description_key = UM()->profile()->get_show_bio_key( UM()->fields()->global_args );