赞
踩
onlyoffice的版本为7.2.2
docker exec -it onlyoffice-server bash
进入 /var/www/onlyoffice/documentserver/web-apps/apps/api/documents/ 目录,在api.js中以下两处添加添加wps、et和dps
cd /var/www/onlyoffice/documentserver/web-apps/apps/api/documents/
vim api.js
var appMap = {
'text': 'docx',
'text-pdf': 'pdf',
'spreadsheet': 'xlsx',
'presentation': 'pptx',
'word': 'docx',
'cell': 'xlsx',
'slide': 'pptx',
'wps': 'docx',
'et': 'xlsx',
'dps': 'pptx'
}, app;
var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots|xlsb|et)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp|dps)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|oxps|docm|dot|dotm|dotx|fodt|ott|fb2|xml|oform|docxf|wps))$/
.exec(_config.document.fileType);
rm -rf api.js.gz
修改配置文件代码,config.py
import os FILE_SIZE_MAX = 5242880 STORAGE_PATH = 'app_data' DOC_FOLDER = "doc" DOC_SERV_VIEWED = [".pdf", ".djvu", ".xps"] DOC_SERV_EDITED = [".docx", ".xlsx", ".csv", ".pptx", ".txt", ".wps", ".xls", ".doc", ".dps", ".et"] DOC_SERV_CONVERT = [ ".docm", ".doc", ".dotx", ".dotm", ".dot", ".odt", ".fodt", ".ott", ".xlsm", ".xls", ".xltx", ".xltm", ".xlt", ".ods", ".fods", ".ots", ".pptm", ".ppt", ".ppsx", ".ppsm", ".pps", ".potx", ".potm", ".pot", ".odp", ".fodp", ".otp", ".rtf", ".mht", ".html", ".htm", ".epub" ] DOC_SERV_TIMEOUT = 120000 DOC_SERV_CONVERTER_URL = 'http://0.0.0.0:9880/ConvertService.ashx' DOC_SERV_API_URL = 'http://0.0.0.0:9880/web-apps/apps/api/documents/api.js' DOC_SERV_PRELOADER_URL = 'http://0.0.0.0:9880/web-apps/apps/api/documents/cache-scripts.html' EXAMPLE_DOMAIN = 'http://0.0.0.0:8000/' DOC_SERV_JWT_SECRET = 'rtf_jwt_secret' EXT_SPREADSHEET = [ ".xls", ".xlsx", ".xlsm", ".xlt", ".xltx", ".xltm", ".ods", ".fods", ".ots", ".csv", ".et" ] EXT_PRESENTATION = [ ".pps", ".ppsx", ".ppsm", ".ppt", ".pptx", ".pptm", ".pot", ".potx", ".potm", ".odp", ".fodp", ".otp", ".dps" ] EXT_DOCUMENT = [ ".doc", ".docx", ".docm", ".dot", ".dotx", ".dotm", ".odt", ".fodt", ".ott", ".rtf", ".txt", ".html", ".htm", ".mht", ".pdf", ".djvu", ".fb2", ".epub", ".xps", "wps" ] if os.environ.get("EXAMPLE_DOMAIN"): EXAMPLE_DOMAIN = os.environ.get("EXAMPLE_DOMAIN") if os.environ.get("DOC_SERV"): base = os.environ.get("DOC_SERV").rstrip('/') DOC_SERV_CONVERTER_URL = base + '/ConvertService.ashx' DOC_SERV_API_URL = base + '/web-apps/apps/api/documents/api.js' DOC_SERV_PRELOADER_URL = base + '/web-apps/apps/api/documents/cache-scripts.html'
docker exec -it onlyoffice-server bash
cd /var/www/onlyoffice/documentserver/core-fonts/
rm -rf *
exit
docker cp /home/Fonts onlyoffice-server:/var/www/onlyoffice/documentserver/core-fonts/
docker exec -it onlyoffice-server bash
/usr/bin/documentserver-generate-allfonts.sh
exit
docker restart onlyoffice-server
docker exec -it onlyoffice-server bash
vim /var/www/onlyoffice/documentserver/web-apps/apps/documenteditor/main/app.js
{value:42,displayValue:"初号"}, {value:36,displayValue:"小初"}, {value:26,displayValue:"一号"}, {value:24,displayValue:"小一"}, {value:22,displayValue:"二号"}, {value:18,displayValue:"小二"}, {value:16,displayValue:"三号"}, {value:15,displayValue:"小三"}, {value:14,displayValue:"四号"}, {value:12,displayValue:"小四"}, {value:10.5,displayValue:"五号"}, {value:9,displayValue:"小五"}, {value:7.5,displayValue:"六号"}, {value:6.5,displayValue:"小六"}, {value:5.5,displayValue:"七号"}, {value:5,displayValue:"八号"},
rm -rf app.js.gz
exit
docker restart onlyoffice-server
注意:测试时清除本地缓存
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。