Notifications
Clear all

Script [Solved] Change Default Height of Editor

2 Posts
2 Users
1 Reactions
1,764 Views
Posts: 63
Topic starter
(@hshah)
Trusted Member
Joined: 5 years ago

For some reason the editor window is really short by default. Is there any CSS or something I could apply so that it is taller from when the page loads? 

1 Reply
Alvina
Posts: 1862
Moderator
(@alvina)
Member
Joined: 5 years ago

Hi @hshah,

Please put the following code in the active theme functions.php file, it works for all editors but the topic editor:

add_filter('wpforo_editor_settings', function($settings){
  $settings['editor_height'] = 180;
  return  $settings;
});

You can change the red marked code as you want.

For topics, insert this CSS code in Dashboard > Forums > Settings > Styles > Custom CSS Code textarea, save it, delete all caches, go to forum front-end and press Ctrl+F5:

#wpforo #wpforo-wrap.wpft-topic .wp-editor-container .mce-edit-area iframe {
    min-height: 180px;
}
#wpforo #wpforo-wrap.wpft-topic .mce-edit-area.mce-container.mce-panel.mce-stack-layout-item{
     min-height: 180px;
}