redactor plugin events
$.Redactor.prototype.themeStyles = function () {
return {
init: function () {
var keys = this.button.getButtonsKeys();
// set redactor wrapper div id
self.redactorId = isValue(this.$editor) ? this.$editor[0].id : null;
this.core.element().on('dropdownShow.callback.redactor', function(e)
{
if (e.key === 'font-family')
{
let dropdown = e.dropdown;
console.log("dropdown box");
console.log(dropdown[0]);
console.log(dropdown[0].childNodes);
console.log(dropdown[0].childNodes[0].innerText);
dropdown[0].childNodes[0].innerHTML = '<a class="currentDropdownItem" href="javascript:void(0)">Current: ' + self.findCurrentProperty(fontFamilyProperty) + '</a>';
}
});
},
showAlert: function (buttonName) {
alert(buttonName);
}