mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-07 17:56:39 +00:00
feat(templates): 新增绿色主题模版,并设置为默认模版
和文档站点 docs.xxyopen.com 风格保持一致
This commit is contained in:
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>wangEditor 获取内容</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>wangEditor 获取内容</p>
|
||||
<div id="div3">
|
||||
<p>欢迎使用 wangEditor 富文本编辑器</p>
|
||||
<p>欢迎使用 wangEditor 富文本编辑器</p>
|
||||
</div>
|
||||
<div>
|
||||
<button id="btn1">获取html</button>
|
||||
<button id="btn2">获取text</button>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/wangEditor.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var E = window.wangEditor
|
||||
var editor2 = new E('#div3')
|
||||
editor2.create()
|
||||
|
||||
document.getElementById('btn1').addEventListener('click', function () {
|
||||
console.log(editor2.txt.html())
|
||||
alert(editor2.txt.html())
|
||||
}, false)
|
||||
|
||||
document.getElementById('btn2').addEventListener('click', function () {
|
||||
alert(editor2.txt.text())
|
||||
}, false)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user