Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: aegersz on June 14, 2019, 06:24:40 AM

Title: Any simple way to increase the editors window automatically ?
Post by: aegersz on June 14, 2019, 06:24:40 AM
Hi forumfolk,

After about 5 years of manually expanding the editor's window i wondered if it is preset somewhere convenient?
Title: Re: Any simple way to increase the editors window automatically ?
Post by: Sir Osis of Liver 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



<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.
Title: Re: Any simple way to increase the editors window automatically ?
Post by: aegersz on June 14, 2019, 03:05:58 PM
Perfect !

so much nicer than looking through a letterbox.

thank you, Sir.
Title: Re: Any simple way to increase the editors window automatically ?
Post by: kesulin on June 19, 2019, 09:06:04 AM
Interesting option. Thanks!
Title: Re: Any simple way to increase the editors window automatically ?
Post by: aegersz on June 29, 2019, 08:34:42 PM
i think so, too.

maybe it will one day it could be a Configuration option - after all, where would we be without an editor ?!

(a joke i heard: " I hate rhetorical statements, I mean "what's the point ?!" ")  ::)

I settled on 400px.
Title: Re: Any simple way to increase the editors window automatically ?
Post by: Biology Forums on June 30, 2019, 10:02:07 AM
Check my link: https://biology-forums.com/index.php?action=post;board=3.0

Press enter number of times on the textarea. It expands automatically...

Is that something you'd be interested in?
Title: Re: Any simple way to increase the editors window automatically ?
Post by: kesulin on July 01, 2019, 05:26:42 AM
Quote from: Study Force on June 30, 2019, 10:02:07 AM
Check my link: https://biology-forums.com/index.php?action=post;board=3.0

Press enter number of times on the textarea. It expands automatically...

Is that something you'd be interested in?
Not for me, thanks!
Title: Re: Any simple way to increase the editors window automatically ?
Post by: aegersz on July 02, 2019, 05:26:43 AM
Thanks but i'm finding a larger window as a DEFAULT to be more suitable.