.
기본 이미지 아이콘 및 다른 원치 않는 아이콘을 사용 중지했습니다.
나는 자신의 버튼과 아이콘을 추가했는데 기본 글꼴 대신 글꼴 멋진 아이콘을 사용했습니다.
//In the config.js
var editor;
var plgnIconSize = "16px";
var plgnIcons = ["fa-file-image-o", ...];
var plgnNames = 'img,... Other plugins';
var plgnDefault = 'fa-plug';
CKEDITOR.editorConfig = function (config) {
config.toolbar = [
{ name: 'uploader', items: ['img'] },
// Your other plugins as per your need goes here
];
config.extraPlugins = plgnNames;
});
CKEDITOR.on("instanceReady", function (event) {
editor = event.editor;
var this_instance = document.getElementById(event.editor.id + '_toolbox');
var plugins = plgnNames.split(',');
for (var i = 0; i < plugins.length; i++) {
var this_button = this_instance.querySelector('.cke_button__' + plugins[i] + '_icon');
if (typeof this_button !== null) {
var icon;
if (typeof plgnIcons[i] === 'undefined')
icon = plgnDefault
else
icon = plgnIcons[i];
if (typeof this_button !== notdefined) {
this_button.innerHTML = '<i class=" ' + plgnClass[i] + ' fa ' + icon + '" style="font: normal normal normal ' + plgnIconSize + '/1 FontAwesome !important;cursor: default;"></i>';
}
}
}
});
그래서 TL; DR, DOM으로 바꾸셨습니까? 공정한, 그러나 아주 오버 헤드. 나는 공식적인 더 좋은 길은 없다고 상상할 수 없다. .. 그러나 나는 그것을 위해 갈 것이다, 영감에 감사한다! –
예! 나는 해결책을 찾지 못했고 따라서이 트릭을 잠깐 생각 해냈다. 그러나이 방법으로, 주위에 놀기 위하여 글꼴 톤이 있기 때문에 당신은 아이콘을 찾는 것을 갈 필요 없다. 천만에요. – Ozesh