r89838 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89837‎ | r89838 | r89839 >
Date:18:31, 10 June 2011
Author:tparscal
Status:deferred
Tags:
Comment:
* Added tab rendering as arrow symbols
* Made demo show selection in monospaced/preformatted text
Modified paths:
  • /trunk/parsers/wikidom/demos/surface/index.html (modified) (history)
  • /trunk/parsers/wikidom/lib/jquery.editSurface.css (modified) (history)
  • /trunk/parsers/wikidom/lib/jquery.flow.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/jquery.flow.js
@@ -77,7 +77,8 @@
7878 .replace( '>', '>' )
7979 .replace( '\'', ''' )
8080 .replace( '"', '"' )
81 - .replace( '\n', '<span class="invisible">&#9166;</span>' );
 81+ .replace( '\n', '<span class="editSurface-whitespace">&#9166;</span>' )
 82+ .replace( '\t', '<span class="editSurface-whitespace">&#8677;</span>' );
8283 word.html += charHtml;
8384 if ( $.flow.charCache[char] === undefined ) {
8485 // Cache miss
Index: trunk/parsers/wikidom/lib/jquery.editSurface.css
@@ -10,6 +10,8 @@
1111 border: solid 1px Highlight;
1212 line-height: 1.5em;
1313 cursor: text;
 14+ font-family: "Courier New", monospace;
 15+ white-space: pre-wrap;
1416 }
1517
1618 #selection p {
@@ -35,14 +37,15 @@
3638 line-height: 1.5em;
3739 cursor: text;
3840 white-space: nowrap;
39 - background-color: rgba(204, 204, 204, 0.25);
4041 }
 42+
4143 .editSurface-line.empty {
4244 display: block;
4345 width: 0px;
4446 }
45 -.editSurface-line .invisible {
46 - color: green;
 47+
 48+.editSurface-line .editSurface-whitespace {
 49+ color: #888888;
4750 padding: 0 0.25em;
4851 }
4952
@@ -59,4 +62,4 @@
6063 width: 1px;
6164 height: 1.5em;
6265 display: none;
63 -}
\ No newline at end of file
 66+}
Index: trunk/parsers/wikidom/demos/surface/index.html
@@ -30,7 +30,8 @@
3131 { 'text': "The soft returns are usually placed after the ends of complete words, or after the punctuation that follows complete words. However, word wrap may also occur following a hyphen." },
3232 { 'text': "Word wrap following hyphens is sometimes not desired, and can be avoided by using a so-called non-breaking hyphen instead of a regular hyphen. On the other hand, when using word processors, invisible hyphens, called soft hyphens, can also be inserted inside words so that word wrap can occur following the soft hyphens." },
3333 { 'text': "Sometimes, word wrap is not desirable between words. In such cases, word wrap can usually be avoided by using a hard space or non-breaking space between the words, instead of regular spaces." },
34 - { 'text': "OccasionallyThereAreWordsThatAreSoLongTheyExceedTheWidthOfTheLineAndEndUpWrappingBetweenMultipleLines." }
 34+ { 'text': "OccasionallyThereAreWordsThatAreSoLongTheyExceedTheWidthOfTheLineAndEndUpWrappingBetweenMultipleLines." },
 35+ { 'text': "Text might have \ttabs\t in it too." }
3536 ]
3637 } ] }
3738 } );

Status & tagging log