ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: scripple on April 13, 2014, 10:00:59 pm

Title: sceditor as configured does not use editor_settings['height']
Post by: scripple on April 13, 2014, 10:00:59 pm
Turns out setting height:100% on sceditor does not actually make sceditor match the height of the existing textarea, so changing the editor height in $context doesn't do anything.

If you simply delete the height line from sceditor in GenericControls it does use the height of the existing text area.  Although it turns out that height includes the toolbar and grip, but I don't think that's anything new.

Pull request here.
https://github.com/elkarte/Elkarte/pull/1536
Title: Re: sceditor as configured does not use editor_settings['height']
Post by: emanuele on April 14, 2014, 07:42:37 am
Yeah, I suspect the 100% was a remnant from the period when I was trying to make it expand "forever".
IIRC, removing it should be safe, so merged.
Remember if it breaks something: blame Norv. :P
Title: Re: sceditor as configured does not use editor_settings['height']
Post by: scripple on April 14, 2014, 11:00:21 am
One thing I did note with this change is it makes the mobile editor smaller as the header takes more space on mobile.  I boosted the height if your mobile browser flags were set.  I noticed when poking at the code there were variables about not subtracting the header from the height of the edit box.  It might only set those if you supply a separate container to hold the toolbar but it might be worth considering so we don't have this odd textarea size shrinks based on browser width.

Odd bug too that doesn't matter with the height:100% dropped, but when I had height:100% and set the border of the sceditor container to none it got very confused and made the textarea like 1 line high.
Title: Re: sceditor as configured does not use editor_settings['height']
Post by: emanuele on April 14, 2014, 11:16:00 am
Looks like an interesting thing to try indeed.