代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>微信编辑器</title>
<script type="text/javascript" src="jquery-1.10.2.js"></script>
<script type="text/javascript" src="ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="ueditor_custom.js">
</script>
</head>
<body>
<div class="container ueditor-content">
<div id="js_editor" class="edui_editor_wrp"></div>
</div>
<p>
<button type="button" name="button" id="ok">确定</button>
</p>
<script type="text/javascript">
var editorId = "appmsg_editor";
var editor = UE.getEditor("js_editor", {
id: editorId,
wordCount: false,
elementPathEnabled: false
});
editor.addListener("catchremotesuccess", function() {
tips.success("内容已上传完成");
});
editor.addListener("catchremoteerror", function() {
tips.error("远程图片抓取失败");
});
editor.ready(function() {
var toolbars = editor.ui.toolbars;
$('#' + editor.ui.toolbars[0].id).addClass("edui-toolbar-primary");
$('#' + editor.ui.toolbars[1].id).addClass("edui-toobar-secondary");
$("#" + editorId + "_toolbarbox").addClass("show-edui-more");
for (var i = 0; i < toolbars.length; i++) {
var toolbar = toolbars[i];
var items = toolbar.items;
for (var j = 0; j < items.length; j++) {
if (items[j] instanceof UE.ui.Combox || items[j] instanceof UE.ui.SplitButton) {
$("#" + items[j].id + "_state").tooltip({
container: 'body'
});
} else if (items[j] instanceof UE.ui.Button || items[j] instanceof UE.ui.MenuButton) {
$("#" + items[j].id + "_body").tooltip({
container: 'body'
});
}
}
}
});
$("#ok").click(function() {
var data = editor.getContent();
alert(data);
});
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。