diff --git a/assets/js/um-profile.js b/assets/js/um-profile.js
index f3232353..f145bd8d 100644
--- a/assets/js/um-profile.js
+++ b/assets/js/um-profile.js
@@ -139,4 +139,17 @@ jQuery(document).ready(function() {
jQuery( '.um-profile-nav a' ).on( 'touchend', function(e) {
jQuery( e.currentTarget).trigger( "click" );
});
+
+ let textarea_iframe = jQuery('iframe.um-textarea-html-value, .mce-edit-area iframe');
+ textarea_iframe.each(function() {
+ jQuery(this).onload = function() {
+ resizeIframe(iframe);
+ };
+ });
});
+
+function resizeIframe(obj, height) {
+ let dataHeight = obj.getAttribute('data-height');
+ obj.style.minHeight = obj.contentWindow.document.documentElement.scrollHeight + 'px';
+ obj.style.height = dataHeight + 'px';
+}
diff --git a/includes/core/um-filters-fields.php b/includes/core/um-filters-fields.php
index 6d5d2bc9..582016e8 100644
--- a/includes/core/um-filters-fields.php
+++ b/includes/core/um-filters-fields.php
@@ -259,8 +259,10 @@ function um_profile_field_filter_hook__textarea( $value, $data ) {
if ( ! $value ) {
return '';
}
+
if ( ! empty( $data['html'] ) ) {
- return '';
+ $height = isset( $data['height'] ) && absint( $data['height'] ) > 0 ? absint( $data['height'] ) : '';
+ return '';
}
$description_key = UM()->profile()->get_show_bio_key( UM()->fields()->global_args );