Skip to content

Commit 02e0d76

Browse files
author
Will Bamberg
committed
Add files missing form last commit
1 parent 506e7e8 commit 02e0d76

6 files changed

Lines changed: 61 additions & 26 deletions

File tree

editable-samples/css/editable.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,33 @@ body {
88
margin: 0.5em;
99
}
1010

11+
.CodeMirror {
12+
box-shadow: inset 0px 2px 2px -2px rgba(0,0,0,0.2);
13+
border: 1px solid rgba(0,0,0,0.2);
14+
border-top: 1px solid rgba(0,0,0,0.3);
15+
border-bottom: 1px solid rgba(0,0,0,0.1);
16+
}
17+
18+
#editor {
19+
position: relative;
20+
margin-bottom: 1em;
21+
}
22+
23+
#editor>input {
24+
position: absolute;
25+
z-index: 10;
26+
}
27+
28+
#edit {
29+
top: 10px;
30+
right: 80px;
31+
}
32+
33+
#reset {
34+
top: 10px;
35+
right: 10px;
36+
}
37+
1138
#output {
1239
width: 100%;
1340
height: 200px;

editable-samples/js/editable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
var element = document.getElementById("example-element");
22
var input = document.getElementById("input");
3+
var editor = document.getElementById("editor");
34
var reset = document.getElementById("reset");
45
var edit = document.getElementById("edit");
56

67
var cmOptions = {
78
mode: "css",
8-
theme: "mdn-like"
9+
theme: "eclipse",
10+
lineNumbers: true,
11+
showCursorWhenSelecting: true
912
}
1013

11-
var cmEditor = CodeMirror(document.body, cmOptions);
14+
var cmEditor = CodeMirror(editor, cmOptions);
1215
cmEditor.setSize("100%", 50);
1316
cmEditor.doc.setValue(cmInitContent);
1417

editable-samples/pages/border-top-color/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@
55
<link href="../../css/editable.css" rel="stylesheet"></link>
66

77
<link href="../../codemirror/lib/codemirror.css" rel="stylesheet">
8-
<link href="../../codemirror/theme/mdn-like.css" rel="stylesheet"></link>
8+
<link href="../../codemirror/theme/eclipse.css" rel="stylesheet"></link>
99
<link href="../../codemirror/addon/hint/show-hint.css" rel="stylesheet"></link>
1010

1111
<link href="css/element.css" rel="stylesheet"></link>
1212
</head>
1313

1414
<body>
15+
16+
<div id="editor">
17+
<input id="edit" type="button" value="Edit" />
18+
<input id="reset" type="button" value="Reset" />
19+
</div>
20+
1521
<div id="output">
1622
<div id="example-element">
1723
<p>This is a box with a border around it.
@@ -20,11 +26,6 @@
2026
</div>
2127
</div>
2228

23-
<div id="buttons">
24-
<input id="edit" type="button" value="Edit CSS" />
25-
<input id="reset" type="button" value="Reset" />
26-
</div>
27-
2829
<script src="../../codemirror/lib/codemirror.js"></script>
2930
<script src="../../codemirror/mode/css/css.js"></script>
3031
<script src="../../codemirror/addon/hint/css-hint.js"></script>

editable-samples/pages/filter/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@
55
<link href="../../css/editable.css" rel="stylesheet"></link>
66

77
<link href="../../codemirror/lib/codemirror.css" rel="stylesheet">
8-
<link href="../../codemirror/theme/mdn-like.css" rel="stylesheet"></link>
8+
<link href="../../codemirror/theme/eclipse.css" rel="stylesheet"></link>
99
<link href="../../codemirror/addon/hint/show-hint.css" rel="stylesheet"></link>
1010

1111
<link href="css/element.css" rel="stylesheet"></link>
1212
</head>
1313

1414
<body>
15-
<div id="output">
16-
<img id="example-element" src="img/firefox.png"/>
17-
</div>
1815

19-
<div id="buttons">
20-
<input id="edit" type="button" value="Edit CSS" />
16+
<div id="editor">
17+
<input id="edit" type="button" value="Edit" />
2118
<input id="reset" type="button" value="Reset" />
2219
</div>
2320

21+
<div id="output">
22+
<img id="example-element" src="img/firefox.png"/>
23+
</div>
24+
2425
<script src="../../codemirror/lib/codemirror.js"></script>
2526
<script src="../../codemirror/mode/css/css.js"></script>
2627
<script src="../../codemirror/addon/hint/css-hint.js"></script>

editable-samples/pages/font/index.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@
55
<link href="../../css/editable.css" rel="stylesheet"></link>
66

77
<link href="../../codemirror/lib/codemirror.css" rel="stylesheet">
8-
<link href="../../codemirror/theme/mdn-like.css" rel="stylesheet"></link>
8+
<link href="../../codemirror/theme/eclipse.css" rel="stylesheet"></link>
99
<link href="../../codemirror/addon/hint/show-hint.css" rel="stylesheet"></link>
1010

1111
<link href="css/element.css" rel="stylesheet"></link>
1212
</head>
1313

1414
<body>
15-
<div id="output">
16-
<span id="example-element">London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill. Smoke lowering down from chimney-pots, making a soft black drizzle, with flakes of soot in it as big as full-grown snowflakes—gone into mourning, one might imagine, for the death of the sun. Dogs, undistinguishable in mire. Horses, scarcely better; splashed to their very blinkers. Foot passengers, jostling one another's umbrellas in a general infection of ill temper, and losing their foot-hold at street-corners, where tens of thousands of other foot passengers have been slipping and sliding since the day broke (if this day ever broke), adding new deposits to the crust upon crust of mud, sticking at those points tenaciously to the pavement, and accumulating at compound interest.</span>
17-
</div>
1815

19-
<div id="buttons">
20-
<input id="edit" type="button" value="Edit CSS" />
16+
17+
<div id="editor">
18+
<input id="edit" type="button" value="Edit" />
2119
<input id="reset" type="button" value="Reset" />
2220
</div>
2321

22+
<div id="output">
23+
<span id="example-element">London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill. Smoke lowering down from chimney-pots, making a soft black drizzle, with flakes of soot in it as big as full-grown snowflakes—gone into mourning, one might imagine, for the death of the sun. Dogs, undistinguishable in mire. Horses, scarcely better; splashed to their very blinkers. Foot passengers, jostling one another's umbrellas in a general infection of ill temper, and losing their foot-hold at street-corners, where tens of thousands of other foot passengers have been slipping and sliding since the day broke (if this day ever broke), adding new deposits to the crust upon crust of mud, sticking at those points tenaciously to the pavement, and accumulating at compound interest.</span>
24+
</div>
25+
2426
<script src="../../codemirror/lib/codemirror.js"></script>
2527
<script src="../../codemirror/mode/css/css.js"></script>
2628
<script src="../../codemirror/addon/hint/css-hint.js"></script>

editable-samples/pages/transform/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@
55
<link href="../../css/editable.css" rel="stylesheet"></link>
66

77
<link href="../../codemirror/lib/codemirror.css" rel="stylesheet">
8-
<link href="../../codemirror/theme/mdn-like.css" rel="stylesheet"></link>
8+
<link href="../../codemirror/theme/eclipse.css" rel="stylesheet"></link>
99
<link href="../../codemirror/addon/hint/show-hint.css" rel="stylesheet"></link>
1010

1111
<link href="css/element.css" rel="stylesheet"></link>
1212
</head>
1313

1414
<body>
15-
<div id="output">
16-
<img id="example-element" src="img/firefox.png"/>
17-
</div>
1815

19-
<div id="buttons">
20-
<input id="edit" type="button" value="Edit CSS" />
16+
<div id="editor">
17+
<input id="edit" type="button" value="Edit" />
2118
<input id="reset" type="button" value="Reset" />
2219
</div>
2320

21+
<div id="output">
22+
<img id="example-element" src="img/firefox.png"/>
23+
</div>
24+
2425
<script src="../../codemirror/lib/codemirror.js"></script>
2526
<script src="../../codemirror/mode/css/css.js"></script>
2627
<script src="../../codemirror/addon/hint/css-hint.js"></script>

0 commit comments

Comments
 (0)