[v1.20.4.4]在原有l(wèi)ayedit基礎上新增 1.html源碼模式 2.全屏 3.批量上傳圖片、插入視頻 4.字體顏色、背景色設置、段落格式設置 5.插入表格 6.右鍵修改圖片視頻、段落居中格式、刪除等功能 7.插入水平線hr 8.錨點 9.插入代碼和插入超鏈接拓展 10.插入自定義鏈接 11.簡單實現(xiàn)撤銷重做【不推薦使用】
        layui.use(['layedit', 'layer', 'jquery'], function () {
            var $ = layui.jquery;
            var layedit = layui.layedit;
            layedit.set({
                //暴露layupload參數(shù)設置接口 --詳細查看layupload參數(shù)說明
                uploadImage: {
                    url: '/Attachment/LayUploadFile',
                    accept: 'image',
                    acceptMime: 'image/*',
                    exts: 'jpg|png|gif|bmp|jpeg',
                    size: '10240'
                }
                , uploadVideo: {
                    url: '/Attachment/LayUploadFile',
                    accept: 'video',
                    acceptMime: 'video/*',
                    exts: 'mp4|flv|avi|rm|rmvb',
                    size: '20480'
                }
                //右鍵刪除圖片/視頻時的回調(diào)參數(shù),post到后臺刪除服務器文件等操作,
                //傳遞參數(shù):
                //圖片: imgpath --圖片路徑
                //視頻: filepath --視頻路徑 imgpath --封面路徑
                , calldel: {
                    url: '/Attachment/DeleteFile'
                }
                //開發(fā)者模式 --默認為false
                , devmode: true
                //插入代碼設置
                , codeConfig: {
                    hide: true,  //是否顯示編碼語言選擇框
                    default: 'javascript' //hide為true時的默認語言格式
                }
                , tool: [
                    'html', 'code', 'strong', 'italic', 'underline', 'del', 'addhr', '|', 'fontFomatt', 'colorpicker', 'face'
                    , '|', 'left', 'center', 'right', '|', 'link', 'unlink',‘images’, 'image_alt', 'video', 'anchors'
                    , '|',‘table’, 'fullScreen'
                ]
                , height: '90%'
            });
            var ieditor = layedit.build('layeditDemo');
        })