mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-27 01:30:51 +00:00
24 lines
684 B
Java
24 lines
684 B
Java
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>wangEditor test onchange</title>
|
|
</head>
|
|
<body>
|
|
<div id="div1">
|
|
<p>欢迎使用 wangEditor 富文本编辑器</p>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="/wangEditor.min.js"></script>
|
|
<script type="text/javascript">
|
|
var E = window.wangEditor
|
|
var editor = new E('#div1')
|
|
editor.customConfig.onchange = function (html) {
|
|
// html 即编辑器中的内容
|
|
console.log('onchange', html)
|
|
}
|
|
editor.customConfig.onchangeTimeout = 200 // 自定义 onchange 触发的延迟时间
|
|
editor.create()
|
|
</script>
|
|
</body>
|
|
</html> |