Simplemde-markdown-editor: Is it possible to get scrollbars to work?

Created on 7 Jun 2016  路  3Comments  路  Source: sparksuite/simplemde-markdown-editor

In the demos, if you enter more text than will fit in the editor, the editor simply grows. How does one keep the editor the same size, but enable scrollbars?

I have tried setting a max-width on .CodeMirror, which does keep the editor from growing. But the scrollbars never show.

I also set overflow: scroll on .CodeMirror. Scrollbars appear, but they don't work. Despite having additional text, the editor will not scroll.

Most helpful comment

This is what enabled it for me:

.CodeMirror {
height: 300px;
}

although you may also need:

overflow-y: auto;

My problem was that we were already using codemirror in the project, so the original CSS files, which were included _after_ mine, were overriding these values.

All 3 comments

Looks like the problem was that my project had other css files for codemirror that were the culprit.

This is what enabled it for me:

.CodeMirror {
height: 300px;
}

although you may also need:

overflow-y: auto;

My problem was that we were already using codemirror in the project, so the original CSS files, which were included _after_ mine, were overriding these values.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nivv picture nivv  路  4Comments

pranavstark picture pranavstark  路  3Comments

garethrbrown picture garethrbrown  路  5Comments

abr4xas picture abr4xas  路  3Comments

xJoeyv picture xJoeyv  路  3Comments