UNPKG

1.14 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="zh-cn">
3
4<head>
5 <meta charset="UTF-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta http-equiv="X-UA-Compatible" content="ie=edge">
8 <script src="./dist/wscode.js"></script>
9 <title>Web Studio Code</title>
10
11 <style>
12 div#wscode {
13 width: 800px;
14 height: 600px;
15 }
16 </style>
17
18</head>
19
20<body>
21
22 <div id="wscode"></div>
23
24 <script>
25 window.wscode = new WSCode({
26
27 // 编辑器挂载点
28 el: document.getElementById('wscode'),
29
30 // 设置字体
31 "font-family": "serif",
32
33 // 设置字重
34 "font-weight": 800,
35
36 tabSpace: 2,
37
38 // 初始化文本
39 content: "// git+https://github.com/yelloxing/Web-Studio-Code.git\n// Web Studio Code:🎉 An Editor Used on the Browser Side.\n\n/**\n * Developed by 心叶(yelloxing@gmail.com)\n*/\n\nfunction doit(){\n console.log('你好,世界!');\n}"
40 });
41
42 console.log(wscode);
43 </script>
44
45</body>
46
47</html>
\No newline at end of file