Full size editor #45

Closed
opened 2011-03-20 09:52:07 +01:00 by ghost1 · 4 comments
ghost1 commented 2011-03-20 09:52:07 +01:00 (Migrated from gitlab.com)

Hello, is it possible to make CodeMirror2 to be fullsize (full page size)? I added:
width: 100%; height: 100%; to the CodeMirror style and this works only under Chromium. Any another browser doesn't want to make editor with that size.

Any ideas?

Hello, is it possible to make CodeMirror2 to be fullsize (full page size)? I added: width: 100%; height: 100%; to the `CodeMirror` style and this works only under Chromium. Any another browser doesn't want to make editor with that size. Any ideas?
marijnh commented 2011-03-20 20:17:33 +01:00 (Migrated from gitlab.com)

Hi,

I'm not aware of a cross-browser way to make something the size of the
window (there might be one though -- I'm no CSS guru. If you find
something, let me know.) What I'd do is have a script set the
.style.height of the wrapper element (see .getWrapperElement method),
and register an onresize handler on the window that resets this height
(using window.innerHeight and such, depending on the browser).

Best,
Marijn

Hi, I'm not aware of a cross-browser way to make something the size of the window (there might be one though -- I'm no CSS guru. If you find something, let me know.) What I'd do is have a script set the .style.height of the wrapper element (see .getWrapperElement method), and register an onresize handler on the window that resets this height (using window.innerHeight and such, depending on the browser). Best, Marijn
ghost1 commented 2011-03-20 20:19:12 +01:00 (Migrated from gitlab.com)

Hello, thanks for the reply. I found one way for this:
position: absolute; height: 100%; top: 0; bottom: 0; left: 0; right: 0;
This should be added into .CodeMirror class.

Hello, thanks for the reply. I found one way for this: `position: absolute; height: 100%; top: 0; bottom: 0; left: 0; right: 0;` This should be added into `.CodeMirror` class.
marijnh commented 2011-03-20 20:20:57 +01:00 (Migrated from gitlab.com)

position: absolute; height: 100%; top: 0; bottom: 0; left: 0; right: 0;

Thanks! That's good to know -- I'll pass it on to the next person who asks ;)

Cheers,
Marijn

> `position: absolute; height: 100%; top: 0; bottom: 0; left: 0; right: 0;` Thanks! That's good to know -- I'll pass it on to the next person who asks ;) Cheers, Marijn
ghost1 commented 2011-03-20 20:21:53 +01:00 (Migrated from gitlab.com)

No problems ;) Good luck with developing.

No problems ;) Good luck with developing.
ghost1 (Migrated from gitlab.com) closed this issue 2011-03-20 20:21:53 +01:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/codemirror5#45
No description provided.