|
|
|
@ -111,7 +111,7 @@
|
|
|
|
|
<div class="layui-form-item layui-form-text">
|
|
|
|
|
<label class="layui-form-label">书籍简介</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<textarea class="layui-textarea layui-hide" name="description" lay-verify="content" id="LAY_demo_editor"><%=description %></textarea>
|
|
|
|
|
<textarea class="layui-textarea" name="description" lay-verify="content" id="LAY_demo_editor"><%=description %></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -130,6 +130,10 @@ layui.use(['form', 'layedit', 'jquery'], function(){
|
|
|
|
|
var form = layui.form
|
|
|
|
|
,layer = layui.layer
|
|
|
|
|
,layedit = layui.layedit;
|
|
|
|
|
/**
|
|
|
|
|
* 因为富文本存在xss注入,以下代码不用了,如果需要可以开启
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
var editIndex = layedit.build('LAY_demo_editor');
|
|
|
|
|
// 自定义验证规则
|
|
|
|
|
form.verify({
|
|
|
|
@ -137,7 +141,8 @@ layui.use(['form', 'layedit', 'jquery'], function(){
|
|
|
|
|
content: function(value){
|
|
|
|
|
return layedit.sync(editIndex);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
*/
|
|
|
|
|
//监听提交
|
|
|
|
|
form.on('submit(formDemo)', function(data){
|
|
|
|
|
$.ajax({
|
|
|
|
|