ueditor富文本框圖片顯示


修改config.json

/* 前后端通信相關的配置,注釋只允許使用多行方式 */
{
    /*"physicsPath":"E:/Software/apache-tomcat-7.0.76/webapps/topsale",*/
    /*"physicsPath":"/var/www/topsale/topsale/train/content",*/
    "physicsPath":"D:/apache-tomcat-7.0.75/webapps/toms",
    /* 上傳圖片配置項 */
    "imageActionName": "uploadimage", /* 執行上傳圖片的action名稱 */
    "imageFieldName": "upfile", /* 提交的圖片表單名稱 */
    "imageMaxSize": 2048000, /* 上傳大小限制,單位B */
    "imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上傳圖片格式顯示 */
    "imageCompressEnable": true, /* 是否壓縮圖片,默認是true */
    "imageCompressBorder": 1600, /* 圖片壓縮最長邊限制 */
    "imageInsertAlign": "none", /* 插入的圖片浮動方式 */
    "imageUrlPrefix": "http://localhost:8080/toms", /* 圖片訪問路徑前綴 */
    /*"imageUrlPrefix": "http://obctop.tcl.com.cn/topsale/train/content",*/
    "imagePathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上傳保存路徑,可以自定義保存路徑和文件名格式 */
                                /* {filename} 會替換成原文件名,配置這項需要注意中文亂碼問題 */
                                /* {rand:6} 會替換成隨機數,后面的數字是隨機數的位數 */
                                /* {time} 會替換成時間戳 */
                                /* {yyyy} 會替換成四位年份 */
                                /* {yy} 會替換成兩位年份 */
                                /* {mm} 會替換成兩位月份 */
                                /* {dd} 會替換成兩位日期 */
                                /* {hh} 會替換成兩位小時 */
                                /* {ii} 會替換成兩位分鍾 */
                                /* {ss} 會替換成兩位秒 */
                                /* 非法字符 \ : * ? " < > | */
                                /* 具請體看線上文檔: fex.baidu.com/ueditor/#use-format_upload_filename */
    /*"imagePathFormat": "/train/content/image/{yyyy}{mm}{dd}/{time}{rand:6}",*/
    /*"imagePathFormat": "/image/{yyyy}{mm}{dd}/{time}{rand:6}",*/
    /* 塗鴉圖片上傳配置項 */
    "scrawlActionName": "uploadscrawl", /* 執行上傳塗鴉的action名稱 */
    "scrawlFieldName": "upfile", /* 提交的圖片表單名稱 */
    "scrawlPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上傳保存路徑,可以自定義保存路徑和文件名格式 */
    /*"scrawlPathFormat": "/train/content/image/{yyyy}{mm}{dd}/{time}{rand:6}",*/
    /*"scrawlPathFormat": "/image/{yyyy}{mm}{dd}/{time}{rand:6}",*/
    "scrawlMaxSize": 2048000, /* 上傳大小限制,單位B */
    /*"scrawlUrlPrefix": "localhost:8080/topsale",*/ /* 圖片訪問路徑前綴 */
    "scrawlUrlPrefix": "http://obctop.tcl.com.cn/topsale/train/content",
    "scrawlInsertAlign": "none",

    /* 截圖工具上傳 */
    "snapscreenActionName": "uploadimage", /* 執行上傳截圖的action名稱 */
    /*"snapscreenPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}",*/ /* 上傳保存路徑,可以自定義保存路徑和文件名格式 */
    /*"snapscreenPathFormat": "/train/content/image/{yyyy}{mm}{dd}/{time}{rand:6}", */
    "snapscreenPathFormat": "/image/{yyyy}{mm}{dd}/{time}{rand:6}",
    /*"snapscreenUrlPrefix": "localhost:8080/topsale",*/ /* 圖片訪問路徑前綴 */
    "snapscreenUrlPrefix": "http://obctop.tcl.com.cn/topsale/train/content",
    "snapscreenInsertAlign": "none", /* 插入的圖片浮動方式 */

    /* 抓取遠程圖片配置 */
    "catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"],
    "catcherActionName": "catchimage", /* 執行抓取遠程圖片的action名稱 */
    "catcherFieldName": "source", /* 提交的圖片列表表單名稱 */
    /*"catcherPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}",*/ /* 上傳保存路徑,可以自定義保存路徑和文件名格式 */
    /*"catcherPathFormat": "/train/content/image/{yyyy}{mm}{dd}/{time}{rand:6}",*/
    "catcherPathFormat": "/image/{yyyy}{mm}{dd}/{time}{rand:6}",
    /*"catcherUrlPrefix": "localhost:8080/topsale",*/ /* 圖片訪問路徑前綴 */
    "catcherUrlPrefix": "http://obctop.tcl.com.cn/topsale/train/content",
    "catcherMaxSize": 2048000, /* 上傳大小限制,單位B */
    "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取圖片格式顯示 */

    /* 上傳視頻配置 */
    "videoActionName": "uploadvideo", /* 執行上傳視頻的action名稱 */
    "videoFieldName": "upfile", /* 提交的視頻表單名稱 */
    /*"videoPathFormat": "/ueditor/jsp/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}",*/ /* 上傳保存路徑,可以自定義保存路徑和文件名格式 */
    /*"videoPathFormat": "/train/content/video/{yyyy}{mm}{dd}/{time}{rand:6}",*/
    "videoPathFormat": "/video/{yyyy}{mm}{dd}/{time}{rand:6}",
    /*"videoUrlPrefix": "localhost:8080/topsale",*/ /* 視頻訪問路徑前綴 */
    "videoUrlPrefix": "http://obctop.tcl.com.cn/topsale/train/content",
    "videoMaxSize": 1073741824, /* 上傳大小限制,單位B,默認1GB */
    "videoAllowFiles": [
        ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
        ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上傳視頻格式顯示 */

    /* 上傳文件配置 */
    "fileActionName": "uploadfile", /* controller里,執行上傳視頻的action名稱 */
    "fileFieldName": "upfile", /* 提交的文件表單名稱 */
    /*"filePathFormat": "/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}", *//* 上傳保存路徑,可以自定義保存路徑和文件名格式 */
    /*"filePathFormat": "/train/content/file/{yyyy}{mm}{dd}/{time}{rand:6}",*/
    "filePathFormat": "/file/{yyyy}{mm}{dd}/{time}{rand:6}",
    /*"fileUrlPrefix": "localhost:8080/topsale",*/ /* 文件訪問路徑前綴 */
    "fileUrlPrefix": "http://obctop.tcl.com.cn/topsale/train/content",
    "fileMaxSize": 1073741824, /* 上傳大小限制,單位B,默認50MB */
    "fileAllowFiles": [
        ".png", ".jpg", ".jpeg", ".gif", ".bmp",
        ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
        ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
        ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
        ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
    ], /* 上傳文件格式顯示 */

    /* 列出指定目錄下的圖片 */
    "imageManagerActionName": "listimage", /* 執行圖片管理的action名稱 */
    "imageManagerListPath": "/ueditor/jsp/upload/image/", /* 指定要列出圖片的目錄 */
    /*"imageManagerListPath": "/train/content/image/",*/
    /*"imageManagerListPath": "/image/",*/
    "imageManagerListSize": 20, /* 每次列出文件數量 */
    /*"imageManagerUrlPrefix": "localhost:8080/toms",*/ /* 圖片訪問路徑前綴 */
    /*"imageManagerUrlPrefix": "http://obctop.tcl.com.cn/topsale/train/content",*/
    "imageManagerInsertAlign": "none", /* 插入的圖片浮動方式 */
    "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件類型 */

    /* 列出指定目錄下的文件 */
    "fileManagerActionName": "listfile", /* 執行文件管理的action名稱 */
    /*"fileManagerListPath": "/ueditor/jsp/upload/file/",*/ /* 指定要列出文件的目錄 */
    /*"fileManagerListPath": "/train/content/file/",*/
    "fileManagerListPath": "/file/",
    /*"fileManagerUrlPrefix": "localhost:8080/topsale",*/ /* 文件訪問路徑前綴 */
    "fileManagerUrlPrefix": "http://obctop.tcl.com.cn/topsale/train/content",
    "fileManagerListSize": 20, /* 每次列出文件數量 */
    "fileManagerAllowFiles": [
        ".png", ".jpg", ".jpeg", ".gif", ".bmp",
        ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
        ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
        ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
        ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
    ] /* 列出的文件類型 */

}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM