Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.39k stars 316 forks source link

Setting maxHeight appears to have no effect #212

Open kurucu opened 4 years ago

kurucu commented 4 years ago

Describe the bug Setting {maxHeight: '500px'} in the options appears to have no effect, and the editor continues to adjust height to the content.

To Reproduce Steps to reproduce the behavior:

  1. Create a new editor with the option above
  2. Fill it with a lot of content
  3. See that the editor does not respect the max height.

Expected behavior The editor should expand up to the size defined and then grow now larger, with y overflow scrolling at that point.

Version information

Ionaru commented 4 years ago

Related to #206 ?

kurucu commented 4 years ago

Possibly? I've just checked and setting maxHeight has no effect on either the editor, the preview or the side by side mode heights. So it seems like a different issue, but that said, they are using a different OS and browser (probably not the cause, but worth noting).

My "fix" for now is as follows, which seems to work in all cases.

    .CodeMirror {
        max-height: 30rem;
    }
nick-denry commented 4 years ago

Hi @kurucu

EasyMDE version: 2.10.1

maxHeight option is under unreleased version at CHANGELOG https://github.com/Ionaru/easy-markdown-editor/blob/master/CHANGELOG.md, so it's not included to 2.10.1

You must use master branch to use this option now.

Ionaru commented 4 years ago

Released now :)

kurucu commented 4 years ago

Great work, I'll give it a spin later today.