2 Commits

3 changed files with 22 additions and 9 deletions
Split View
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/ueditor/config/config.json
  2. +16
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/ueditor/ueditor.all.js
  3. +5
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/ueditor/ueditor.view.js

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/ueditor/config/config.json View File

@@ -8,7 +8,7 @@
"imageCompressEnable": true, /* 是否压缩图片,默认是true */
"imageCompressBorder": 1600, /* 图片压缩最长边限制 */
"imageInsertAlign": "none", /* 插入的图片浮动方式 */
"imageUrlPrefix": "http://wxd3f.cyzjzx.com/ueditor/", /* 图片访问路径前缀 */
"imageUrlPrefix": "/ueditor/", /* 图片访问路径前缀 */
"imagePathFormat": "upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
/* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
/* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */


+ 16
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/ueditor/ueditor.all.js View File

@@ -24795,19 +24795,29 @@ UE.plugin.register('insertfile', function (){

var i, item, icon, title,
html = '',
URL = me.getOpt('UEDITOR_HOME_URL'),
iconDir = URL + (URL.substr(URL.length - 1) == '/' ? '':'/') + 'dialogs/attachment/fileTypeImages/';

// 原代码
// URL = me.getOpt('UEDITOR_HOME_URL'),
// iconDir = URL + (URL.substr(URL.length - 1) == '/' ? '':'/') + 'dialogs/attachment/fileTypeImages/';
// 去掉地址的域名
URL = '/Content/ueditor/',
iconDir = URL + 'dialogs/attachment/fileTypeImages/';

for (i = 0; i < filelist.length; i++) {
item = filelist[i];
icon = iconDir + getFileIcon(item.url);
title = item.title || item.url.substr(item.url.lastIndexOf('/') + 1);
// html += '<p style="line-height: 16px;">' +
// '<img style="vertical-align: middle; margin-right: 2px;" src="'+ icon + '" _src="' + icon + '" />' +
// '<a style="font-size:12px; color:#0066cc;" href="' + item.url +'" title="' + title + '">' + title + '</a>' +
// '</p>';

// 原代码
html += '<p style="line-height: 16px;">' +
'<img style="vertical-align: middle; margin-right: 2px;" src="'+ icon + '" _src="' + icon + '" />' +
'<a style="font-size:12px; color:#0066cc;" href="' + item.url +'" title="' + title + '">' + title + '</a>' +
'</p>';
// 去除图标
// html += '<p style="line-height: 16px;">' +
// '<a style="font-size:12px; color:#0066cc;" href="' + item.url +'" title="' + title + '">' + title + '</a>' +
// '</p>';

}
me.execCommand('insertHtml', html);
}


+ 5
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/ueditor/ueditor.view.js View File

@@ -1,7 +1,10 @@
let imgs = document.querySelectorAll('img')
imgs.forEach(e => {
let src = e.getAttribute('src')
if (src.includes('Content/ueditor/dialogs/attachment/fileTypeImages/icon_')){
e.style.display = 'none'
if (src.includes('Content/ueditor/dialogs/attachment/fileTypeImages/icon_')) {
// e.style.display = 'none'
let arr = src.split('Content/ueditor/dialogs/attachment/fileTypeImages/icon_')
src = '/Content/ueditor/dialogs/attachment/fileTypeImages/icon_' + arr[arr.length - 1]
e.setAttribute('src', src)
}
})

Loading…
Cancel
Save