You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following should work (for a custom extension).
var HighlighterButton = MediumEditor.extensions.button.extend({
name: 'highlighter',
tagNames: ['mark'], // nodeName which indicates the button should be 'active' when isAlreadyApplied() is called
contentDefault: '<b>H</b>', // default innerHTML of the button
contentFA: '<i class="fa fa-paint-brush"></i>', // innerHTML of button when 'fontawesome' is being used
aria: 'Hightlight', // used as both aria-label and title attributes
action: 'highlight', // used as the data-action attribute of the button
init: function () {
//console.log('HIGHLIGHT BUTTON....');
MediumEditor.extensions.button.prototype.init.call(this);
this.classApplier = rangy.createClassApplier('highlight', {
elementTagName: 'mark',
normalize: true
});
},
handleClick: function (event) {
this.classApplier.toggleSelection();
}
});
first example mentioned here doesn't work in the latest version.
Angular medium editor version - 1.1.0
Plunker Example Demo
The text was updated successfully, but these errors were encountered: