ueditor.config.js 6.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* 前后端通信相关的配置,注释只允许使用多行方式 */
  2. module.exports = {
  3. /* 上传图片配置项 */
  4. "imageActionName": "uploadimage", /* 执行上传图片的action名称 */
  5. "imageFieldName": "upfile", /* 提交的图片表单名称 */
  6. "imageMaxSize": 2048000, /* 上传大小限制,单位B */
  7. "imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上传图片格式显示 */
  8. "imageCompressEnable": true, /* 是否压缩图片,默认是true */
  9. "imageCompressBorder": 1600, /* 图片压缩最长边限制 */
  10. "imageInsertAlign": "none", /* 插入的图片浮动方式 */
  11. "imageUrlPrefix": "", /* 图片访问路径前缀 */
  12. "imagePathFormat": "/ueditor/ue/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
  13. /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
  14. /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
  15. /* {time} 会替换成时间戳 */
  16. /* {yyyy} 会替换成四位年份 */
  17. /* {yy} 会替换成两位年份 */
  18. /* {mm} 会替换成两位月份 */
  19. /* {dd} 会替换成两位日期 */
  20. /* {hh} 会替换成两位小时 */
  21. /* {ii} 会替换成两位分钟 */
  22. /* {ss} 会替换成两位秒 */
  23. /* 非法字符 \ : * ? " < > | */
  24. /* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */
  25. /* 涂鸦图片上传配置项 */
  26. "scrawlActionName": "uploadscrawl", /* 执行上传涂鸦的action名称 */
  27. "scrawlFieldName": "upfile", /* 提交的图片表单名称 */
  28. "scrawlPathFormat": "/ueditor/ue/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
  29. "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */
  30. "scrawlUrlPrefix": "", /* 图片访问路径前缀 */
  31. "scrawlInsertAlign": "none",
  32. /* 截图工具上传 */
  33. "snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */
  34. "snapscreenPathFormat": "/ueditor/ue/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
  35. "snapscreenUrlPrefix": "", /* 图片访问路径前缀 */
  36. "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */
  37. /* 抓取远程图片配置 */
  38. "catcherLocalDomain": ["www.escook.cn"],
  39. "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */
  40. "catcherFieldName": "source", /* 提交的图片列表表单名称 */
  41. "catcherPathFormat": "/ueditor/ue/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
  42. "catcherUrlPrefix": "", /* 图片访问路径前缀 */
  43. "catcherMaxSize": 2048000, /* 上传大小限制,单位B */
  44. "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */
  45. /* 上传视频配置 */
  46. "videoActionName": "uploadvideo", /* 执行上传视频的action名称 */
  47. "videoFieldName": "upfile", /* 提交的视频表单名称 */
  48. "videoPathFormat": "/ueditor/ue/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
  49. "videoUrlPrefix": "", /* 视频访问路径前缀 */
  50. "videoMaxSize": 102400000, /* 上传大小限制,单位B,默认100MB */
  51. "videoAllowFiles": [
  52. ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
  53. ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上传视频格式显示 */
  54. /* 上传文件配置 */
  55. "fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */
  56. "fileFieldName": "upfile", /* 提交的文件表单名称 */
  57. "filePathFormat": "/ueditor/ue/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
  58. "fileUrlPrefix": "", /* 文件访问路径前缀 */
  59. "fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */
  60. "fileAllowFiles": [
  61. ".png", ".jpg", ".jpeg", ".gif", ".bmp",
  62. ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
  63. ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
  64. ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
  65. ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
  66. ], /* 上传文件格式显示 */
  67. /* 列出指定目录下的图片 */
  68. "imageManagerActionName": "listimage", /* 执行图片管理的action名称 */
  69. "imageManagerListPath": "/ueditor/ue/", /* 指定要列出图片的目录 */
  70. "imageManagerListSize": 20, /* 每次列出文件数量 */
  71. "imageManagerUrlPrefix": "", /* 图片访问路径前缀 */
  72. "imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */
  73. "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */
  74. /* 列出指定目录下的文件 */
  75. "fileManagerActionName": "listfile", /* 执行文件管理的action名称 */
  76. "fileManagerListPath": "/ueditor/ue/", /* 指定要列出文件的目录 */
  77. "fileManagerUrlPrefix": "", /* 文件访问路径前缀 */
  78. "fileManagerListSize": 20, /* 每次列出文件数量 */
  79. "fileManagerAllowFiles": [
  80. ".png", ".jpg", ".jpeg", ".gif", ".bmp",
  81. ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
  82. ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
  83. ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
  84. ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
  85. ] /* 列出的文件类型 */
  86. }