mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-07 09:46:38 +00:00
feat(templates): 新增绿色主题模版,并设置为默认模版
和文档站点 docs.xxyopen.com 风格保持一致
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>wangEditor demo getJSON</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>获取 JSON</p>
|
||||
<div id="div1">
|
||||
<p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p>
|
||||
<img src="https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo_top_ca79a146.png" style="max-width:100%;"/>
|
||||
</div>
|
||||
<button id="btn1">getJSON</button>
|
||||
|
||||
<script type="text/javascript" src="/wangEditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
var E = window.wangEditor
|
||||
var editor = new E('#div1')
|
||||
editor.create()
|
||||
|
||||
document.getElementById('btn1').addEventListener('click', function () {
|
||||
var json = editor.txt.getJSON()
|
||||
var jsonStr = JSON.stringify(json)
|
||||
console.log(json)
|
||||
console.log(jsonStr)
|
||||
alert(jsonStr)
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user