- fix min-height and height of html textarea

This commit is contained in:
ashubawork
2024-10-03 11:56:36 +03:00
parent f79f2a7d2b
commit a69435f15a
2 changed files with 16 additions and 1 deletions
+13
View File
@@ -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';
}