javascript - How to customize an extension in medium editor? -


i'd change "anchor" extension button label use unicode symbol browser link - (u+1f517). don't want install fontawesome.

to need way either modify extension or subclass it. suggestions?

in case looking simple way override the content of of built-in mediumeditor buttons, can specify properties during initialization of mediumeditor object. button text, you'd want override defaultcontent property of button, accepts block of html:

var editor = new mediumeditor('.editable', {     toolbar: {         buttons: ['bold', 'italic', 'underline',             {                 name: 'anchor',                 defaultcontent: '<i>my unicode char</i>'             }         ]     } }); 

you can find more examples of simple button properties can overriden in fashion in button options section of mediumeditor readme. includes ability add custom classes or additional attributes button element.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -