Comparing changes
Open a pull request
- +1 −1 addon/edit/matchbrackets.js
- +1 −1 bin/release
- +1 −1 bower.json
- +1 −0 doc/compress.html
- +17 −3 doc/manual.html
- +10 −0 doc/releases.html
- +4 −4 index.html
- +13 −2 lib/codemirror.css
- +1,025 −448 lib/codemirror.js
- +1 −1 package.json
- +5 −2 test/test.js
- +2 −0 theme/3024-day.css
- +2 −0 theme/3024-night.css
- +4 −6 theme/ambiance.css
- +2 −0 theme/base16-dark.css
- +2 −0 theme/base16-light.css
- +2 −0 theme/blackboard.css
- +2 −0 theme/cobalt.css
- +2 −0 theme/erlang-dark.css
- +2 −0 theme/lesser-dark.css
- +2 −0 theme/mbo.css
- +2 −0 theme/mdn-like.css
- +2 −0 theme/midnight.css
- +2 −0 theme/monokai.css
- +2 −0 theme/night.css
- +2 −0 theme/paraiso-dark.css
- +2 −0 theme/paraiso-light.css
- +3 −0 theme/pastel-on-dark.css
- +2 −0 theme/rubyblue.css
- +6 −6 theme/solarized.css
- +2 −0 theme/the-matrix.css
- +2 −0 theme/tomorrow-night-eighties.css
- +2 −0 theme/twilight.css
- +2 −0 theme/vibrant-ink.css
- +2 −0 theme/xq-dark.css
| @@ -81,7 +81,7 @@ | ||
| if (marks.length) { | ||
| // Kludge to work around the IE bug from issue #1193, where text | ||
| // input stops going to the textare whever this fires. | ||
| - if (ie_lt8 && cm.state.focused) cm.display.input.focus(); | ||
| + if (ie_lt8 && cm.state.focused) cm.focus(); | ||
| var clear = function() { | ||
| cm.operation(function() { | ||
| @@ -42,5 +42,5 @@ rewrite("doc/compress.html", function(cmp) { | ||
| rewrite("index.html", function(index) { | ||
| return index.replace(/\.zip">\d+\.\d+<\/a>/, | ||
| - ".zip>" + simple + "</a>"); | ||
| + ".zip\">" + simple + "</a>"); | ||
| }); | ||
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "codemirror", | ||
| - "version":"4.13.0", | ||
| + "version":"5.0.0", | ||
| "main": ["lib/codemirror.js", "lib/codemirror.css"], | ||
| "ignore": [ | ||
| "**/.*", | ||
| @@ -36,6 +36,7 @@ | ||
| <input type="hidden" id="download" name="download" value="codemirror-compressed.js"/> | ||
| <p>Version: <select id="version" onchange="setVersion(this);" style="padding: 1px;"> | ||
| <option value="http://codemirror.net/">HEAD</option> | ||
| + <option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=5.0.0;f=">5.0</option> | ||
| <option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=4.13.0;f=">4.13</option> | ||
| <option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=4.12.0;f=">4.12</option> | ||
| <option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=4.11.0;f=">4.11</option> | ||
| @@ -63,7 +63,7 @@ | ||
| <section class=first id=overview> | ||
| <h2 style="position: relative"> | ||
| User manual and reference guide | ||
| - <span style="color: #888; font-size: 1rem; position: absolute; right: 0; bottom: 0">version 4.13.0</span> | ||
| + <span style="color: #888; font-size: 1rem; position: absolute; right: 0; bottom: 0">version 5.0.0</span> | ||
| </h2> | ||
| <p>CodeMirror is a code-editor component that can be embedded in | ||
| @@ -333,6 +333,17 @@ <h3 id=modloader>Module loaders</h3> | ||
| option is set to true, it will be covered by an element with | ||
| class <code>CodeMirror-gutter-filler</code>.</dd> | ||
| + <dt id="option_inputStyle"><code><strong>inputStyle</strong>: string</code></dt> | ||
| + <dd>Selects the way CodeMirror handles input and focus. The core | ||
| + library defines the <code>"textarea"</code> | ||
| + and <code>"contenteditable"</code> input models. On mobile | ||
| + browsers, the default is <code>"contenteditable"</code>. On | ||
| + desktop browsers, the default is <code>"textarea"</code>. | ||
| + Support for IME and screen readers is better in | ||
| + the <code>"contenteditable"</code> model. The intention is to | ||
| + make it the default on modern desktop browsers in the | ||
| + future.</dd> | ||
| + | ||
| <dt id="option_readOnly"><code><strong>readOnly</strong>: boolean|string</code></dt> | ||
| <dd>This disables editing of the editor content by the user. If | ||
| the special value <code>"nocursor"</code> is given (instead of | ||
| @@ -1965,8 +1976,11 @@ <h3 id="api_misc">Miscellaneous methods</h3> | ||
| <dt id="focus"><code><strong>cm.focus</strong>()</code></dt> | ||
| <dd>Give the editor focus.</dd> | ||
| - <dt id="getInputField"><code><strong>cm.getInputField</strong>() → TextAreaElement</code></dt> | ||
| - <dd>Returns the hidden textarea used to read input.</dd> | ||
| + <dt id="getInputField"><code><strong>cm.getInputField</strong>() → Element</code></dt> | ||
| + <dd>Returns the input field for the editor. Will be a textarea | ||
| + or an editable div, depending on the value of | ||
| + the <a href="#option_inputStyle"><code>inputStyle</code></a> | ||
| + option.</dd> | ||
| <dt id="getWrapperElement"><code><strong>cm.getWrapperElement</strong>() → Element</code></dt> | ||
| <dd>Returns the DOM node that represents the editor, and | ||
| controls its size. Remove this from your tree to delete an | ||
| @@ -29,6 +29,16 @@ | ||
| <h2>Version 4.x</h2> | ||
| + <p class="rel">20-02-2015: <a href="http://codemirror.net/codemirror-5.0.zip">Version 5.0</a>:</p> | ||
| + | ||
| + <ul class="rel-note"> | ||
| + <li>Experimental mobile support (tested on iOS, Android Chrome, stock Android browser)</li> | ||
| + <li>New option <a href="manual.html#option_inputStyle"><code>inputStyle</code></a> to switch between hidden textarea and contenteditable input.</li> | ||
| + <li>The <a href="manual.html#getInputField"><code>getInputField</code></a> | ||
| + method is no longer guaranteed to return a textarea.</li> | ||
| + <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.12.0...4.13.0">list of patches</a>.</li> | ||
| + </ul> | ||
| + | ||
| <p class="rel">20-02-2015: <a href="http://codemirror.net/codemirror-4.13.zip">Version 4.13</a>:</p> | ||
| <ul class="rel-note"> | ||
| @@ -96,7 +96,7 @@ | ||
| </div> | ||
| </div> | ||
| <div class=actionsleft> | ||
| - Get the current version: <a href="http://codemirror.net/codemirror.zip>4.13</a>.<br> | ||
| + Get the current version: <a href="http://codemirror.net/codemirror.zip">5.0</a>.<br> | ||
| You can see the <a href="https://github.com/codemirror/codemirror" title="Github repository">code</a> or<br> | ||
| read the <a href="doc/releases.html">release notes</a>.<br> | ||
| There is a <a href="doc/compress.html">minification helper</a>. | ||
| @@ -188,9 +188,9 @@ | ||
| <tr><th style="padding-right: 1em;">Internet Explorer</th><td>version 8 and up</td></tr> | ||
| <tr><th>Opera</th><td>version 9 and up</td></tr> | ||
| </table> | ||
| - <p>Modern mobile browsers tend to partly work. Bug reports and | ||
| - patches for mobile support are welcome, but the maintainer does not | ||
| - have the time or budget to actually work on it himself.</p> | ||
| + <p>Support for modern mobile browsers is experimental. Recent | ||
| + versions of the iOS browser and Chrome on Android should work | ||
| + pretty well.</p> | ||
| </section> | ||
| </article> | ||
| @@ -4,6 +4,7 @@ | ||
| /* Set height, width, borders, and global font properties here */ | ||
| font-family: monospace; | ||
| height: 300px; | ||
| + color: black; | ||
| } | ||
| /* PADDING */ | ||
| @@ -139,11 +140,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} | ||
| the editor. You probably shouldn't touch them. */ | ||
| .CodeMirror { | ||
| - line-height: 1; | ||
| position: relative; | ||
| overflow: hidden; | ||
| background: white; | ||
| - color: black; | ||
| } | ||
| .CodeMirror-scroll { | ||
| @@ -215,6 +214,11 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} | ||
| cursor: default; | ||
| z-index: 4; | ||
| } | ||
| +.CodeMirror-gutter-wrapper { | ||
| + -webkit-user-select: none; | ||
| + -moz-user-select: none; | ||
| + user-select: none; | ||
| +} | ||
| .CodeMirror-lines { | ||
| cursor: text; | ||
| @@ -235,6 +239,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} | ||
| z-index: 2; | ||
| position: relative; | ||
| overflow: visible; | ||
| + -webkit-tap-highlight-color: transparent; | ||
| } | ||
| .CodeMirror-wrap pre { | ||
| word-wrap: break-word; | ||
| @@ -256,6 +261,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} | ||
| .CodeMirror-widget {} | ||
| +.CodeMirror-code { | ||
| + outline: none; | ||
| +} | ||
| + | ||
| .CodeMirror-measure { | ||
| position: absolute; | ||
| width: 100%; | ||
| @@ -283,6 +292,8 @@ div.CodeMirror-cursors { | ||
| .CodeMirror-selected { background: #d9d9d9; } | ||
| .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } | ||
| .CodeMirror-crosshair { cursor: crosshair; } | ||
| +.CodeMirror ::selection { background: #d7d4f0; } | ||
| +.CodeMirror ::-moz-selection { background: #d7d4f0; } | ||
| .cm-searching { | ||
| background: #ffa; | ||
Showing you all comments on commits in this comparison.
StefanEnberg
commented on 6ef5f8b
Jun 10, 2015
|
I'm just curious why the latest data is not used all the time? This implementation will cause problems when the user starts composing a word and then removes it. Will cause the first char of that word to re-appear when the whole word is removed. When is the !/\u200b/.test(e.data) test needed which user input? |
|
In some situations, browser stupidly enough also fire compositionend events with empty data when a composition is aborted by, for example, moving the cursor away. I believe the |