首页 > 解决方案 > 将文本颜色图标颜色更改为选定颜色 Froala Editor

问题描述

FroalaEditor中,我正在尝试创建一个使用内联工具栏更改文本颜色的选项。

这是我到目前为止所做的示例:https ://jsfiddle.net/moviecrew/ph7au4v5/

 new FroalaEditor('div#froala-editor', {
   toolbarInline: true,
   charCounterCount: false,
   toolbarVisibleWithoutSelection: true,
   toolbarButtons: ['insertLink', 'color', 'bold', 'italic', 'underline', 'strikeThrough', 
    'subscript', 'superscript', 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 
    'inlineClass', 'inlineStyle', 'clearFormatting']
});

选择颜色后,我想更改此图标的颜色,以反映所选文本的所选颜色。在此处输入图像描述

我检查了文档,但没有与之相关的事件。

我们能做些什么来完成这项工作吗?

它实际上应该看起来像这样https://tppr.me/MFxzb

谢谢

标签: javascriptjqueryeditorfroala

解决方案


推荐阅读