10

Is there a way to make the text area in CodeMirror extension fit the entire screen? I am using 0.32 version downloaded from https://www.sdltridionworld.com/community/2011_extensions/codemirror.aspx

Currently, I find that the text area has a height of 300px, and a lot of screen space goes unused.

enter image description here

Is there a setting or a CSS modification that will make the text area fit the entire screen?

8

Apparently version 0.4 fixes the line height issue. See the CodeMirror repository on GitHub.

Changes in v0.4

Installation script

Fix bug with height of Source tab being limited to 21 lines

Integrate Dreamweaver suggestions from Jaime Santos Alcon (Press ctrl+space)

10

What I have been doing lately is changing the CodeMirror css files themselves to get it to become larger. In your extensions folder under CodeMirror\CSS\codemirror.css change the top 2 classes to the following:

.CodeMirror {
  line-height: 1em;
  font-family: monospace;
  height: 100%;
  /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
  position: relative;
  /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
  overflow: hidden;
}

.CodeMirror-scroll {
  overflow: auto;
  height: 100%;
  /* This is needed to prevent an IE[67] bug where the scrolled content
     is visible outside of the scrolling box. */
  position: relative;
  outline: none;
}

In explanation I changed the height of code-mirror and also the way in which its overflow works to support this extra functionality. I have tested this in Chrome 43 and IE 11 with no bugs found so far.

  • Hey Nicholas, this seems to work well, is this more robust than the 0.4 update? If so, perhaps submit as an improvement too. – Dylan .. Mark Saunders Jul 1 '15 at 6:08
  • I took a look at the CSS of the 0.4 update and as it turns out, they are using the exact same CSS as I posted. – Nicholas Wetmore Jul 8 '15 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.