Simplemde-markdown-editor: Is it possible to set a max height for the edit area?

Created on 17 Dec 2015  路  4Comments  路  Source: sparksuite/simplemde-markdown-editor

I would like to set a max-height and then allow the user to scroll inside the edit area. If I set a max-height it's respected but scrolling is disabled.

Any ideas?

question

Most helpful comment

Figured it out, did like below:

.CodeMirror,
.CodeMirror-scroll {
    max-height: 300px;
}

Add these styles to still have 100% height in full screen mode:

.CodeMirror-fullscreen.CodeMirror {
    max-height: none;
}

.CodeMirror-fullscreen .CodeMirror-scroll {
    max-height: none;
}

All 4 comments

Figured it out, did like below:

.CodeMirror,
.CodeMirror-scroll {
    max-height: 300px;
}

Add these styles to still have 100% height in full screen mode:

.CodeMirror-fullscreen.CodeMirror {
    max-height: none;
}

.CodeMirror-fullscreen .CodeMirror-scroll {
    max-height: none;
}

Where did you add that css?
I just realized that my own .css file was being linked before the simplemde.css, so by simply moving my css below the other, mine then overwrote the simplemde's defaults.

@glenpierce that's probably the case for me too.

Looks like this is now:

.CodeMirror,
.CodeMirror-scroll {
    max-height: 300px;
    min-height: 300px;
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

prologic picture prologic  路  4Comments

garethrbrown picture garethrbrown  路  5Comments

pranavstark picture pranavstark  路  3Comments

xJoeyv picture xJoeyv  路  3Comments

elsuxo picture elsuxo  路  3Comments