Edit D:\xinhaisoft\crisis_new\Scripts\wangeditor\wangeditor.helper.js
/* <script src="/Scripts/wangeditor/wangEditor.min.js"></script> <textarea name="content" class="editor"></textarea> */ const editor = [] $(function () { // ?????? const Host = Global.Host const Dir = Global.Dir if ($('textarea.editor').length > 0) { // ???css const css = '' + '.editor-wrap {border:1px solid #ccc;}' + '.w-e-toolbar {border-bottom:1px solid #f1f1f1;}' + '.w-e-text-container {min-height:200px;}' + '.w-e-text-container p {text-indent:0;}' $('head').append('<style>' + css + '</style>') // ???????? const E = window.wangEditor $('textarea.editor').each(function (i) { const $this = $(this) const html = $this.val().replace(/\?/g, ' ').replace(/<script/g, '<script') const rnd = Math.random().toString().substring(2, 8) const dom = '<div class="editor-wrap">' + '<div id="editor-toolbar-' + rnd + '"></div>' + '<div id="editor-text-' + rnd + '"></div>' + '</div>' $this.hide().data('editor', i).after(dom) editor[i] = new E('#editor-toolbar-' + rnd, '#editor-text-' + rnd) if ($this.hasClass('mini')) { editor[i].config.menus = ['bold', 'italic', 'underline', 'link', 'list', 'image', 'code', 'undo', 'redo'] } editor[i].config.debug = false editor[i].config.onchange = function (html) { $this.val(html) } editor[i].config.pasteIgnoreImg = true // ???10000 editor[i].config.zIndex = 0 // ?????????1M editor[i].config.uploadImgMaxSize = 1024 * 1024 editor[i].config.uploadImgServer = Host + '/upload' editor[i].config.uploadImgMaxLength = 1 editor[i].config.uploadFileName = 'file' editor[i].config.customAlert = function (info) { window.alert(info) } editor[i].config.uploadImgHooks = { customInsert: function (insertImg, result) { if (result.code !== 0) { window.alert('????????' + result.message) } else { const url = Dir + '/' + result.data insertImg(url) } } } editor[i].create() editor[i].txt.html(html) }) } })
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de