forked from aieditor-team/AiEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (53 loc) · 2.13 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>AiEditor Demo</title>
<script>
let isDark = false;
function dark() {
if (!isDark) {
document.body.style.background = "#1a1b1e"
document.querySelector("#title").style.color = "#eee"
document.querySelector("#aiEditor").classList.remove("aie-theme-light");
document.querySelector("#aiEditor").classList.add("aie-theme-dark");
} else {
document.body.style.background = ""
document.querySelector("#title").style.color = ""
document.querySelector("#aiEditor").classList.remove("aie-theme-dark");
document.querySelector("#aiEditor").classList.add("aie-theme-light");
}
isDark = !isDark;
}
function changeLang(){
const lang = localStorage.getItem("lang");
if (!lang || lang === "zh"){
aiEditor.changeLang("en");
localStorage.setItem("lang","en");
}else {
aiEditor.changeLang("zh");
localStorage.setItem("lang","zh");
}
}
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?9fd447a0f9e62a84d1b752a2cacb2c6b";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<div style="padding: 10px 20px;font-size: 30px" id="title">
AiEditor,一个面向 AI 的下一代富文本编辑器。
<a href="https://gitee.com/aieditor-team/aieditor" target="_blank">获取源码</a>
<a href="https://aieditor.dev" target="_blank">访问官网</a>
<button >
<button >
</div>
<div id="aiEditor" style="height: 450px; margin: 20px"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
You can’t perform that action at this time.