/** * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; config.font_names = '宋体/SimSun;' + '黑体/SimHei;' + '仿宋/FangSong;' + '楷体/KaiTi;' + '隶书/LiSu;' + '幼圆/YouYuan;' + '微软雅黑/Microsoft YaHei;' + config.font_names; // 确保字体插件被加载 config.extraPlugins = 'font'; // 可选:设置默认字体 config.font_defaultLabel = '宋体'; // 可选:允许所有字体大小 config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'; // 可选:设置默认字体大小 config.fontSize_defaultLabel = '12px'; // 设置内容CSS config.contentsCss = '/public/ckeditor/custom-ckeditor.css'; // 允许额外的CSS类 config.extraAllowedContent = 'div(page-break)'; // 设置编辑器的宽度,高度可以设置为自动 config.width = '100%'; config.height = 'auto'; // 添加分页符插件(如果需要) config.extraPlugins = 'pagebreak'; // 设置工具栏位置在编辑区域上方 config.toolbarLocation = 'top'; // 修改图片上传配置 config.filebrowserImageUploadUrl = 'http://58.246.234.210:8084/upload/image'; config.imageUploadUrl = 'http://58.246.234.210:8084/upload/image'; // 自定义上传处理 config.uploadUrl = 'http://58.246.234.210:8084/upload/image'; };