- if ( height && !isNaN(height) && tb_height ) {
- ifr_height = (height - tb_height) + 12; // compensate for padding in the textarea
- // sanity check
- if ( ifr_height > 50 && ifr_height < 5000 ) {
- $('#content_tbl').css('height', '' );
- $('#content_ifr').css('height', ifr_height + 'px' );
- }
+ // height cannot be under 50 or over 5000
+ if ( !height || height < 50 || height > 5000 )
+ height = 360; // default height for the main editor
+
+ if ( getUserSetting( 'ed_size' ) > 5000 )
+ setUserSetting( 'ed_size', 360 );
+
+ // compensate for padding and toolbars
+ ifr_height = ( height - tb_height ) + 12;
+
+ // sanity check
+ if ( ifr_height > 50 && ifr_height < 5000 ) {
+ $('#content_tbl').css('height', '' );
+ $('#content_ifr').css('height', ifr_height + 'px' );