Simplemde-markdown-editor: Multiple Textareas Different Heights

Created on 27 Aug 2015  路  4Comments  路  Source: sparksuite/simplemde-markdown-editor

There doesn't seem to be a way to set different heights for multiple textareas.

Any chance of an option being added for this instead of it being entirely controlled by a single CSS class?

question

Most helpful comment

Just place each editor inside of a parent element:

.parent1 .CodeMirror {
    height: 300px;
}

.parent2 .CodeMirror {
    height: 500px;
}

All 4 comments

Just place each editor inside of a parent element:

.parent1 .CodeMirror {
    height: 300px;
}

.parent2 .CodeMirror {
    height: 500px;
}

Good point. Thanks for that, I was clearly off with the fairies.

worked for me as well

You can also control the height in run-time by changing it's style:
document.querySelector(".CodeMirror").style.height = "200px";

Was this page helpful?
0 / 5 - 0 ratings