Size CodeMirror editor to window/viewport; may still need some tweaking, but looking quite good.
This commit is contained in:
		
							parent
							
								
									2dee9a7d81
								
							
						
					
					
						commit
						6a6d87a74c
					
				@ -17,19 +17,35 @@
 | 
			
		||||
<script src="addon/edit/matchbrackets.js"></script>
 | 
			
		||||
<script src="keymap/vim.js"></script>
 | 
			
		||||
<style type="text/css">
 | 
			
		||||
    html, body { height: 100%; margin: 0; padding: 0; }
 | 
			
		||||
    .wrap {
 | 
			
		||||
        position: relative;
 | 
			
		||||
        height: 97%;
 | 
			
		||||
        background: #eee;
 | 
			
		||||
        padding: 20px;
 | 
			
		||||
        box-sizing: border-box;
 | 
			
		||||
    }
 | 
			
		||||
    .border {
 | 
			
		||||
        -webkit-border-radius: 5px;
 | 
			
		||||
        -moz-border-radius: 5px;
 | 
			
		||||
        border-radius: 5px;
 | 
			
		||||
        border: 1px solid #999;
 | 
			
		||||
        position: relative;
 | 
			
		||||
        height: 97%;
 | 
			
		||||
        padding: 1px;
 | 
			
		||||
    }
 | 
			
		||||
    .CodeMirror {
 | 
			
		||||
        border: 1px solid #eee;
 | 
			
		||||
        height: auto;
 | 
			
		||||
        border-top: 1px solid black;
 | 
			
		||||
        border-bottom: 1px solid black;
 | 
			
		||||
        height: 100%;
 | 
			
		||||
    }
 | 
			
		||||
</style>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
 | 
			
		||||
<form><textarea id="editor" name="editor">
 | 
			
		||||
{{{notetxt}}}
 | 
			
		||||
</textarea></form>
 | 
			
		||||
<div class=wrap>
 | 
			
		||||
    <div class=border>
 | 
			
		||||
        <textarea id="editor" name="editor">{{{notetxt}}}</textarea>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
<div style="font-size: 13px; width: 300px; height: 30px;">Key buffer: <span id="command-display"></span></div>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
@ -41,7 +57,8 @@
 | 
			
		||||
        showCursorWhenSelecting: true,
 | 
			
		||||
        viewportMargin: Infinity,
 | 
			
		||||
        indentUnit: 4,
 | 
			
		||||
        styleActiveLine: true
 | 
			
		||||
        styleActiveLine: true,
 | 
			
		||||
        autofocus: true
 | 
			
		||||
    });
 | 
			
		||||
    // Add my .vimrc stuff.
 | 
			
		||||
    CodeMirror.Vim.map('jj', '<Esc>', 'insert')
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user