* Initializes the RedactorPlugins.wbbcode plugin.
*/
init: function() {
- this._createSmileyDropdown();
-
+ var $dropdown = this._createSmileyDropdown();
this.buttonReplace('smiley', 'wsmiley', 'Smiley', $.proxy(function(btnName, $button, btnObject, e) {
this.dropdownShow(e, btnName);
}, this));
+ this.buttonGet('wsmiley').data('dropdown', $dropdown);
this.buttonAwesome('wsmiley', 'fa-smile-o');
this.opts.initCallback = $.proxy(function() {
}
$(this.$toolbar).append($dropdown);
+
+ return $dropdown;
},
/**
* Initializes the RedactorPlugins.wfontcolor plugin.
*/
init: function() {
- this._createFontColorDropdown();
+ var $dropdown = this._createFontColorDropdown();
this.buttonReplace('fontcolor', 'fontcolor', this.opts.curLang.fontcolor, $.proxy(function(btnName, $button, btnObject, e) {
this.dropdownShow(e, btnName);
}, this));
- //this.buttonAwesome('fontcolor', 'fa-font');
+ this.buttonGet('fontcolor').data('dropdown', $dropdown);
},
/**
$dropdown.append($elNone);
$(this.$toolbar).append($dropdown);
+
+ return $dropdown;
},
/**