代码拉取完成,页面将自动刷新
同步操作将从 KnifeZ/Kz.layedit 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>layedit demo</title>
<link href="Content/Layui-KnifeZ/css/layui.css" rel="stylesheet" />
<script src="Content/Layui-KnifeZ/layui.js"></script>
<script src="Content/ace/ace.js"></script>
</head>
<body>
<form class="layui-form">
<div class="layui-form-item">
<textarea id="layeditDemo"></textarea>
</div>
</form>
<script>
layui.use(['layedit', 'layer','form', 'jquery'], function () {
var $ = layui.jquery
, layer = layui.layer
, layedit = layui.layedit;
layedit.set({
uploadImage: {
url: 'your url',
accept: 'image',
acceptMime: 'image/*',
exts: 'jpg|png|gif|bmp|jpeg',
size: 1024 * 10,
done: function (data) {
console.log(data);
}
}
, uploadVideo: {
url: 'your url',
accept: 'video',
acceptMime: 'video/*',
exts: 'mp4|flv|avi|rm|rmvb',
size: 1024 * 10 * 2,
done: function (data) {
console.log(data);
}
}
, uploadFiles: {
url: 'your url',
accept: 'file',
acceptMime: 'file/*',
size: '20480',
done: function (data) {
console.log(data);
}
}
, calldel: {
url: 'your url',
done: function (data) {
console.log(data);
}
}
, autoSync: true
, facePath: 'http://knifez.gitee.io/kz.layedit/Content/Layui-KnifeZ/'
, devmode: true
, tool: [
'html', 'undo', 'redo', 'code', 'strong', 'italic', 'underline', 'del', 'addhr', '|', 'fontFomatt', 'fontfamily','fontSize', 'fontBackColor', 'colorpicker', 'face'
, '|', 'left', 'center', 'right', '|', 'link', 'unlink', 'images', 'image_alt', 'video','attachment', 'anchors'
, '|'
, 'table', 'fullScreen'
]
, height: '80%'
});
var ieditor = layedit.build('layeditDemo');
})
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。