网页版word编译器插件以及layui时间插件使用

富文本编辑器

指定容器引入

1
2
3
4
5
<div>
type="text/javascript" src="../ueditor/ueditor.config.js"
type="text/javascript" src="../ueditor/ueditor.all.js"
<script id="container" name="content" type="text/plain"></script>
</div>

配置

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
// 在全局注册
var ue = null;
// 富文本编辑器初始化 在渲染结束后初始化
ue = UE.getEditor('container', {
// initialFrameWidth: 800,
initialFrameHeight: 400,
toolbars: [
['fullscreen', 'undo', 'redo', 'formatmatch', 'removeformat', '|',
'fontsize', 'bold', 'italic', 'underline', 'forecolor', 'backcolor',
'|',
'justifyleft', 'justifycenter', 'justifyright', '|',
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
'insertorderedlist', 'insertunorderedlist', '|',
'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
'simpleupload', 'attachment', '|', 'inserttable', 'deletetable',
'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol',
'deletecol', 'mergecells', 'mergeright', 'mergedown',
'splittocells', 'splittorows', 'splittocols', '|', 'drafts'
]
],
autoHeightEnabled: true,
autoFloatEnabled: true
});


方法

1
2
3
4
5
// 设置初始内容
ue.setContent("内容");

// 获取内容
ue.getContent();

layui时间插件

1
2
3
4
5
6
7
8
9
10
11
12
13
var _this = this;
layui.use(['laydate'], function () {
var laydate = layui.laydate;
laydate.render({
elem: "#app", //指定元素
theme: "#000", //主题色
done: function (value, date) {
// 选择时间的回调
console.log(value,date)
}
});
});