代码拉取完成,页面将自动刷新
同步操作将从 手里有个码/layui-admx 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<title>TinyMCE</title>
<link rel="stylesheet" href="static/layui-v2.5.6/layui/css/layui.css" media="all">
</head>
<body>
<form class="layui-form" lay-filter="formTinyMCE" action="admin.html">
<div class="layui-form-item">
<label class="layui-form-label">文本框</label>
<div class="layui-input-block">
<input type="text" name="title" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">选择框</label>
<div class="layui-input-block">
<textarea name="tinyMCE" id="tinyMCE">这里是<span style="color: #e03e2d;"><em>edit初始化</em></span>的内容</textarea>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button type="submit" class="layui-btn" lay-submit lay-filter="formDemo">登录</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
<script src="static/layui-v2.5.6/layui/layui.all.js"></script>
<script>
layui.extend({
tinymce: './static/layui-v2.5.6/layui/lay/extends/tinymce/tinymce'
}).use(['form',"jquery","tinymce","util"], function(){
var $ = layui.jquery
,tinymce = layui.tinymce
,form = layui.form;
tinymce.render({
elem: "#tinyMCE"
, height: 600
, width:1000
,language:'zh_CN'
,toolbar: 'undo redo removeformat painterformat|fontselect fontsizeselect styleselect bold forecolor hilitecolor italic|image images table link '
,menubar: false
,images_upload_credentials:true//对images_upload_url中指定的地址调用时是否传递cookie等跨域的凭据。值为布尔值,默认false。
,images_upload_url:'http://192.168.26.7/api/uploadTinymce'//后台返回路径必须是http或https路径否则不能正常回显
,paste_data_images: true, // 设置为“true”即允许粘贴图像,而将其设置为“false”则不允许粘贴图像
},function(opt){
});
form.val('formTinyMCE',{
tinyMCE:'点击按钮设置的内容:<span style="color: #e03e2d;">' + new Date()+'</span>'
})
form.on('submit(formDemo)', function(data){
var data2 = data.field;
console.log('富文本赋值前',data2);
data2.tinyMCE = tinymce.get('#tinyMCE').getContent();
console.log('富文本赋值前',data2);
return false;
});
});
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。