<!-- jian_save
   内容中不能出现单引号，而且addedi.tpl.php里的按钮class须为jian_save -->
        <div id="editor" style="margin: 50px 0 50px 0">
            <!-- <p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p> -->
        </div>
        <input type="hidden" name="content" id="content11" value="<?=$_row['content']?>">
   


<!--<script type="text/javascript" src="../lib/wangEditor-3.1.1/wangEditor.js"></script>-->
<script type="text/javascript">
    layui.use(['layer','wangEditor'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            wangEditor = layui.wangEditor;

        var editor = new wangEditor('#editor');
        editor.customConfig.uploadImgServer = "../index.php?class=base&act=editor_upload";
        // editor.customConfig.uploadFileName = 'file';
        editor.customConfig.pasteFilterStyle = false;
        editor.customConfig.uploadImgMaxLength = 5;
        editor.customConfig.uploadImgHooks = {
            // 上传超时
            timeout: function (xhr, editor) {
                layer.msg('上传超时！')
            },
            // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式，可使用该配置
            customInsert: function (insertImg, result, editor) {
                console.log(result);
                if (result.code == 0) {
                    var url = result.data;
                    url.forEach(function (e) {
                        insertImg(e);
                    })
                   
                } else {
                    layer.msg(result.msg);
                }
            }
        };
        editor.customConfig.customAlert = function (info) {
            layer.msg(info);
        };
        editor.create();
         editor.txt.html('<?=$row['content']?>');

          $(".jian_save").click(function(){
           console.log(editor.txt.html(),222)
  
             $("#content11").val(editor.txt.html())
     
             })
        
    });
</script>