forked from yjs/y-monaco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
41 lines (41 loc) · 1.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Yjs Monaco Example</title>
<style>
#monaco-editor {
width:100%;
height:600px;
border:1px solid #ccc;
}
.yRemoteSelection {
background-color: rgb(250, 129, 0, .5)
}
.yRemoteSelectionHead {
position: absolute;
border-left: orange solid 2px;
border-top: orange solid 2px;
border-bottom: orange solid 2px;
height: 100%;
box-sizing: border-box;
}
.yRemoteSelectionHead::after {
position: absolute;
content: ' ';
border: 3px solid orange;
border-radius: 4px;
left: -4px;
top: -5px;
}
</style>
</head>
<body>
<button type="button" id="y-connect-btn">Disconnect</button>
<p></p>
<p>This is a demo of the <a href="https://github.com/yjs/yjs">Yjs</a> ⇔ <a href="https://microsoft.github.io/monaco-editor/">Monaco</a> binding: <a href="https://github.com/yjs/y-monaco">y-monaco</a>.</p>
<p>The content of this editor is shared with every client that visits this domain.</p>
<div id="monaco-editor" />
<script type="text/javascript" src="/dist/monaco.bundle.js"></script>
</body>
</html>