Guo_10_Jun 2022-04-24 14:50 采纳率: 100%
浏览 112
已结题

CKEditor4怎么添加字体?

问题遇到的现象和发生背景

使用npm install --save ckeditor4-vue下载ckeditor组件后,默认的字体为英文字体,怎么添加其他字体

问题相关代码,请勿粘贴截图

data () {
return {
editorData: '',
editorUrl: 'https://cdn.ckeditor.com/4.16.0/full/ckeditor.js',
editorConfig: {
toolbar: 'Full',
startupFocus: true,
// The configuration of the editor.
toolbar_Full: [
{ name: 'clipboard', items: [ 'Undo', 'Redo' ] },
{ name: 'links', items: [ 'Link', 'Unlink' ] },
{ name: 'align', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight'] },
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline' ] },
{ name: 'styles', items: ['Font', 'FontSize'] }, // 格式 字体 大小
{ name: 'colors', items: ['TextColor', 'BGColor'] },
'/'
],
extraPlugins: 'justify,font,colorbutton',
resize_enabled: false
},

运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果
  • 写回答

1条回答 默认 最新

  • ~白+黑 Python领域新星创作者 2022-04-25 19:45
    关注
    
    
    fontSize_style : Object
    
    用于在文本中应用字体大小的样式定义。
    见源
    
    // This is actually the default value for it.
    config.fontSize_style = {
        element:        'span',
        styles:         { 'font-size': '#(size)' },
        overrides:      [ { element: 'font', attributes: { 'size': null } } ]
    };
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 5月9日
  • 已采纳回答 5月1日
  • 创建了问题 4月24日

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献