Advertisement:

Author Topic: Any simple way to increase the editors window automatically ?  (Read 269 times)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,470
  • Gender: Male
  • "mods" junkie
    • dopetalk
Hi forumfolk,

After about 5 years of manually expanding the editor's window i wondered if it is preset somewhere convenient?
The configuration of my Linux VPS (SMF 2.0 with 140+ mods) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,937
Re: Any simple way to increase the editors window automatically ?
« Reply #1 on: June 14, 2019, 01:37:13 PM »
Interesting.  Inspect element displays textarea height as 175px, but it doesn't appear anywhere in 2.0 code.  Only way I can change it is by adding height here -

GenericControls.template.php

Code: [Select]

<div>
<div style="width: 98.8%;">
<div>
<textarea style="height: 300px;" class="editor" name="', $editor_id, '" id="', $editor_id, '" rows="', $editor_context['rows'], '" cols="600" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '" style="height: ', $editor_context['height'], '; ', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '">', $editor_context['value'], '</textarea>
</div>
<div id="', $editor_id, '_resizer" class="richedit_resize"></div>
</div>
</div>


If you change it anywhere else it has no effect.

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,470
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Any simple way to increase the editors window automatically ?
« Reply #2 on: June 14, 2019, 03:05:58 PM »
Perfect !

so much nicer than looking through a letterbox.

thank you, Sir.
The configuration of my Linux VPS (SMF 2.0 with 140+ mods) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)

Offline kesulin

  • Semi-Newbie
  • *
  • Posts: 23
Re: Any simple way to increase the editors window automatically ?
« Reply #3 on: June 19, 2019, 09:06:04 AM »
Interesting option. Thanks!