AutoStyleExtension for Medium Editor allows auto-styling of words.
The auto-styling is defined in a configuration object, which gets passed to the constructur. In detail:var editor = new MediumEditor('.editable', { extensions: { 'auto-highlight': new AutoStyleExtension({ config: [{ matchcase: false, wordsonly: false, styles: [{ style: 'background-color:yellow;', words: ['yellow'] }, { style: 'background-color:gray;', words: ['gray', 'grey'] }] }, { matchcase: true, wordsonly: true, styles: [{ style: 'color:red;', words: ['RED'] }, { style: 'background-color:orange;', words: ['oraNGE'] }] }]} ) } });
Play around with the words yellow, gray, grey, RED and oraNGE.