使用编辑器插入特殊字符并动态设置字体系列

时间:2013-07-22 08:53:35

标签: javascript jquery aloha-editor

有没有办法使用jquery实时监听事件并检查是否已在Aloha编辑器的页面上插入特殊字符,jquery会将此特殊字符设置为内嵌样式

font-family: FontAwesome

例如,我正在使用Aloha编辑器,当我插入一个特殊字符(这是一个“tick”)时,编辑器插入特殊字符并使用正文字体系列,但这个特殊字符需要设置为font- family:FontAwesome将特殊字符转换为这样的刻度: 因此,目前当我插入特殊字符时,它看起来像[]而不是“tick”。

我不知道这是否会添加任何其他信息,但我在Aloha Editor中用于配置的字符选择器插件设置:

characterpicker: {
        // this is the global setting
        config: [''],
        editables: {
            // this will disable the characterpicker for the header
          //  '#header': '',
            // allow more characters for editables with class 'article'
           // '.aloha-editable': ['&#38','&#34','&#162','&#8364','&#163','&#165','']
        }
},

谢谢:)

0 个答案:

没有答案
相关问题