【问题标题】:add a custom font to jquery CLeditor将自定义字体添加到 jquery CLeditor
【发布时间】:2017-05-03 20:57:42
【问题描述】:

我在我的项目中使用http://premiumsoftware.net/cleditor,并且在字体下拉列表中默认显示了一些字体,现在我有一个字体并想在 cleditor 字体列表中使用此字体,当用户选择此字体时,字体 css 应用给它。

【问题讨论】:

    标签: javascript cleditor


    【解决方案1】:

    与大多数插件一样,有一些选项公开,fonts 是您在初始化插件时可以设置的一个属性

    $("#input").cleditor({               
                fonts: // font names in the font popup
                    "Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," +
                    "Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana"
    })
    

    参见Getting STarted中的可选参数

    【讨论】:

    • 我知道
    • 那么问题出在哪里?简短的相对无意义的评论不会为您带来更多帮助
    • 但是我想上传我的字体,而这个字体在用户电脑中不存在。
    • 为什么问题中没有提到这些?建议您花点时间阅读How to AskQuestion checklist,然后用您的真正问题来更新问题
    • @Rebwar 不,不是,您没有确定真正的问题是什么,并且使问题含糊不清,因此可以以多种方式解释
    猜你喜欢
    • 2016-08-11
    • 2021-09-04
    • 1970-01-01
    • 1970-01-01
    • 2015-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-24
    相关资源
    最近更新 更多