Index: trunk/parsers/wikidom/lib/synth/es.Surface.css |
— | — | @@ -33,8 +33,43 @@ |
34 | 34 | margin-top: 0; |
35 | 35 | position: relative; |
36 | 36 | min-height: 1.5em; |
| 37 | + font-size: 1em; |
37 | 38 | } |
38 | 39 | |
| 40 | +h1.editSurface-headingBlock, h2.editSurface-headingBlock { |
| 41 | + border-bottom: 1px solid #AAA; |
| 42 | +} |
| 43 | + |
| 44 | +h1.editSurface-headingBlock > * { |
| 45 | + font-size:188%; |
| 46 | + font-weight: normal; |
| 47 | +} |
| 48 | + |
| 49 | +h2.editSurface-headingBlock > * { |
| 50 | + font-size:150%; |
| 51 | + font-weight: normal; |
| 52 | +} |
| 53 | + |
| 54 | +h3.editSurface-headingBlock > * { |
| 55 | + font-size:132%; |
| 56 | + font-weight: bold; |
| 57 | +} |
| 58 | + |
| 59 | +h4.editSurface-headingBlock > * { |
| 60 | + font-size:116%; |
| 61 | + font-weight: bold; |
| 62 | +} |
| 63 | + |
| 64 | +h5.editSurface-headingBlock > * { |
| 65 | + font-size:100%; |
| 66 | + font-weight: bold; |
| 67 | +} |
| 68 | + |
| 69 | +h6.editSurface-headingBlock > * { |
| 70 | + font-size:80%; |
| 71 | + font-weight: bold; |
| 72 | +} |
| 73 | + |
39 | 74 | .editSurface-listItem { |
40 | 75 | position: relative; |
41 | 76 | padding: 0 0 0 1em; |
Index: trunk/parsers/wikidom/demos/synth/es.js |
— | — | @@ -2,9 +2,26 @@ |
3 | 3 | var doc = es.DocumentModel.newFromPlainObject( { 'blocks': [ |
4 | 4 | { |
5 | 5 | 'type': 'heading', |
| 6 | + 'level': 1, |
| 7 | + 'content': { |
| 8 | + 'text': 'This is a heading (level 1)', |
| 9 | + 'annotations': [ |
| 10 | + { |
| 11 | + 'type': 'italic', |
| 12 | + 'range': { |
| 13 | + 'start': 10, |
| 14 | + 'end': 17 |
| 15 | + } |
| 16 | + } |
| 17 | + ] |
| 18 | + |
| 19 | + } |
| 20 | + }, |
| 21 | + { |
| 22 | + 'type': 'heading', |
6 | 23 | 'level': 2, |
7 | 24 | 'content': { |
8 | | - 'text': 'This is a heading', |
| 25 | + 'text': 'This is a heading (level 2)', |
9 | 26 | 'annotations': [ |
10 | 27 | { |
11 | 28 | 'type': 'italic', |
— | — | @@ -14,9 +31,78 @@ |
15 | 32 | } |
16 | 33 | } |
17 | 34 | ] |
| 35 | + |
18 | 36 | } |
19 | 37 | }, |
20 | 38 | { |
| 39 | + 'type': 'heading', |
| 40 | + 'level': 3, |
| 41 | + 'content': { |
| 42 | + 'text': 'This is a heading (level 3)', |
| 43 | + 'annotations': [ |
| 44 | + { |
| 45 | + 'type': 'italic', |
| 46 | + 'range': { |
| 47 | + 'start': 10, |
| 48 | + 'end': 17 |
| 49 | + } |
| 50 | + } |
| 51 | + ] |
| 52 | + |
| 53 | + } |
| 54 | + }, |
| 55 | + { |
| 56 | + 'type': 'heading', |
| 57 | + 'level': 4, |
| 58 | + 'content': { |
| 59 | + 'text': 'This is a heading (level 4)', |
| 60 | + 'annotations': [ |
| 61 | + { |
| 62 | + 'type': 'italic', |
| 63 | + 'range': { |
| 64 | + 'start': 10, |
| 65 | + 'end': 17 |
| 66 | + } |
| 67 | + } |
| 68 | + ] |
| 69 | + |
| 70 | + } |
| 71 | + }, |
| 72 | + { |
| 73 | + 'type': 'heading', |
| 74 | + 'level': 5, |
| 75 | + 'content': { |
| 76 | + 'text': 'This is a heading (level 5)', |
| 77 | + 'annotations': [ |
| 78 | + { |
| 79 | + 'type': 'italic', |
| 80 | + 'range': { |
| 81 | + 'start': 10, |
| 82 | + 'end': 17 |
| 83 | + } |
| 84 | + } |
| 85 | + ] |
| 86 | + |
| 87 | + } |
| 88 | + }, |
| 89 | + { |
| 90 | + 'type': 'heading', |
| 91 | + 'level': 6, |
| 92 | + 'content': { |
| 93 | + 'text': 'This is a heading (level 6)', |
| 94 | + 'annotations': [ |
| 95 | + { |
| 96 | + 'type': 'italic', |
| 97 | + 'range': { |
| 98 | + 'start': 10, |
| 99 | + 'end': 17 |
| 100 | + } |
| 101 | + } |
| 102 | + ] |
| 103 | + |
| 104 | + } |
| 105 | + }, |
| 106 | + { |
21 | 107 | 'type': 'paragraph', |
22 | 108 | 'content': { |
23 | 109 | 'text': 'In text display, line wrap is the feature of continuing on a new line when a line is full, such that each line fits in the viewable window, allowing text to be read from top to bottom without any horizontal scrolling.\nWord wrap is the additional feature of most text editors, word processors, and web browsers, of breaking lines between and not within words, except when a single word is longer than a line.', |