Skip to content
\n

However, it only shows one line:

\n

\"image\"

\n

Is there an option to set the height to 100%? I can't override the CSS for .prism-code-editor because it's in a shadowroot.

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

Try adding display: grid to #code-editor. Now the editor's height will match the container. If the editor's content grows taller than the container, it will begin scrolling too. Without display: grid it will overflow out of the container instead of scrolling.

","upvoteCount":1,"url":"https://github.com/jonpyt/prism-code-editor/discussions/12#discussioncomment-9390774"}}}
Discussion options

You must be logged in to vote

Try adding display: grid to #code-editor. Now the editor's height will match the container. If the editor's content grows taller than the container, it will begin scrolling too. Without display: grid it will overflow out of the container instead of scrolling.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@thdoan
Comment options

Answer selected by thdoan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants