Index: trunk/parsers/wikidom/lib/jquery.flow.js |
— | — | @@ -77,7 +77,8 @@ |
78 | 78 | .replace( '>', '>' ) |
79 | 79 | .replace( '\'', ''' ) |
80 | 80 | .replace( '"', '"' ) |
81 | | - .replace( '\n', '<span class="invisible">⏎</span>' ); |
| 81 | + .replace( '\n', '<span class="editSurface-whitespace">⏎</span>' ) |
| 82 | + .replace( '\t', '<span class="editSurface-whitespace">⇥</span>' ); |
82 | 83 | word.html += charHtml; |
83 | 84 | if ( $.flow.charCache[char] === undefined ) { |
84 | 85 | // Cache miss |
Index: trunk/parsers/wikidom/lib/jquery.editSurface.css |
— | — | @@ -10,6 +10,8 @@ |
11 | 11 | border: solid 1px Highlight; |
12 | 12 | line-height: 1.5em; |
13 | 13 | cursor: text; |
| 14 | + font-family: "Courier New", monospace; |
| 15 | + white-space: pre-wrap; |
14 | 16 | } |
15 | 17 | |
16 | 18 | #selection p { |
— | — | @@ -35,14 +37,15 @@ |
36 | 38 | line-height: 1.5em; |
37 | 39 | cursor: text; |
38 | 40 | white-space: nowrap; |
39 | | - background-color: rgba(204, 204, 204, 0.25); |
40 | 41 | } |
| 42 | + |
41 | 43 | .editSurface-line.empty { |
42 | 44 | display: block; |
43 | 45 | width: 0px; |
44 | 46 | } |
45 | | -.editSurface-line .invisible { |
46 | | - color: green; |
| 47 | + |
| 48 | +.editSurface-line .editSurface-whitespace { |
| 49 | + color: #888888; |
47 | 50 | padding: 0 0.25em; |
48 | 51 | } |
49 | 52 | |
— | — | @@ -59,4 +62,4 @@ |
60 | 63 | width: 1px; |
61 | 64 | height: 1.5em; |
62 | 65 | display: none; |
63 | | -} |
\ No newline at end of file |
| 66 | +} |
Index: trunk/parsers/wikidom/demos/surface/index.html |
— | — | @@ -30,7 +30,8 @@ |
31 | 31 | { '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." }, |
32 | 32 | { '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." }, |
33 | 33 | { '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." } |
35 | 36 | ] |
36 | 37 | } ] } |
37 | 38 | } ); |