|
我按照 https://www.yuque.com/o2oa/iit5g5/yg59on 这个教程 给红头文件的编辑器,增加了图片上传按钮。
红头事件load里添加的代码如下:editorConfig.removeButtons 里面已经删除了 Image
this.target._getEditorConfig = function () {
var editorConfig = {
qtRows: 20, // Count of rows
qtColumns: 20, // Count of columns
qtBorder: '1', // Border of inserted table
qtWidth: '100%', // Width of inserted table
qtStyle: { 'border-collapse': 'collapse' },
qtClass: 'documenteditor_table' + this.form.json.id + this.json.id, // Class of table
qtCellPadding: '0', // Cell padding table
qtCellSpacing: '0', // Cell spacing table
qtPreviewBorder: '4px double black', // preview table border
qtPreviewSize: '4px', // Preview table cell size
qtPreviewBackground: '#c8def4', // preview table background (hover)
//修改可选字体名字及对应大小
fontSize_sizes : '一号/34.7px;小一/32px;二号/29.3px;小二/24px;三号/21.3px;小三/20px;四号/18.7px;小四/16px;五号/14px;小五/12px;六号/10px;小六/8.7px;七号/7.3px;八号/6.7px',
//设置段落字体以及字体大小
format_tags: '标题一;标题二;正文(标题三,四)', // entries is displayed in "Paragraph format"
'format_标题一': {
name: '标题一(三号黑体)',
element: 'div',
styles: {
'font-family': '黑体',
'font-size': '16pt'
}
},
'format_标题二': {
name: '标题二(三号楷体)',
element: 'div',
styles: {
'font-family': '楷体',
'font-size': '16pt'
}
},
'format_正文(标题三,四)': {
name: '正文(标题三,四)',
element: 'div',
styles: {
'font-family': '仿宋',
'font-size': '16pt'
}
}
};
editorConfig.toolbarGroups = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'insert', groups: [ 'insert' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
{ name: 'paragraph', groups: [ 'align', 'list', 'indent', 'blocks', 'bidi', 'paragraph' ] },
{ name: 'forms', groups: [ 'forms' ] },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'links', groups: [ 'links' ] },
{ name: 'colors', groups: [ 'colors' ] },
{ name: 'styles', groups: [ 'styles' ] },
{ name: 'tools', groups: [ 'tools' ] },
{ name: 'others', groups: [ 'others' ] },
{ name: 'about', groups: [ 'about' ] }
];
//增加中文字体设置
editorConfig.font_names = '宋体/宋体;黑体/黑体;仿宋/仿宋_GB2312;楷体/楷体;隶书/隶书;幼圆/幼圆;微软雅黑/微软雅黑;' + CKEDITOR.config.font_names;
editorConfig.extraPlugins = "quicktable,tableresize";
editorConfig.removeButtons = 'Source,Save,NewPage,ExportPdf,Preview,Print,Templates,Paste,Scayt,Checkbox,Radio,TextField,Button,ImageButton,HiddenField,Select,Textarea,CopyFormatting,Flash,Smiley,Iframe,PageBreak,Outdent,BidiRtl,Language,BidiLtr,Blockquote,CreateDiv,Indent,Subscript,Superscript,Anchor,Styles,Maximize,ShowBlocks,About,Form';
editorConfig.pasteFromWordRemoveFontStyles = false;
editorConfig.pasteFromWordRemoveStyles = false;
editorConfig.removePlugins = ['magicline'];
editorConfig.enterMode = 3;
return editorConfig;
};
在拟稿时,编辑器是可以上传图片的。
但是,拟稿流转到下一个流程后,上传的图片不见了,还自动出现了“figure 小部件”的字样。
不知道什么原因,请管理员给指导分析一下。
难道是,仅仅增加了上传图片的按钮还不够,还需要增加读取已经上传图片的命令么?
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|