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:Play around with the words CömbineStyleAndClass, CombineStyles, CombineClasses, gräy gräyx, oraNGE oraNGEX, .
(If deleting the content, make sure that the placeholder "Type your text" appears.
The editor seems sometimes to remember the last HTML-color settings. Will look into it.)
.combine-class-one {
border: 2px dotted green;
}
.combine-class-two {
background-color:gold;
}
Config
config: {
sectionA: {
matchcase: false,
wordsonly: false,
class: 'combine-class-one',
style: 'color:red;',
words: ['CömbineStyleAndClass']
},
sectionB: {
matchcase: false,
wordsonly: false,
style: 'background-color:#aaa;',
words: ['gräy']
},
sectionC: {
matchcase: true,
wordsonly: true,
style: 'background-color:orange;',
words: ['oraNGE']
},
sectionD: {
matchcase: true,
wordsonly: true,
class: 'combine-class-one',
words: ['CombineClasses']
},
sectionE: {
matchcase: true,
wordsonly: true,
class: 'combine-class-two',
words: ['CombineClasses']
},
sectionF: {
matchcase: true,
wordsonly: true,
style: 'border: 2px dotted green;',
words: ['CombineStyles']
},
sectionG: {
matchcase: true,
wordsonly: true,
style: 'background-color:gold;',
words: ['CombineStyles']
},
sectionH: {
matchcase: false,
wordsonly: false,
style: 'background-color:silver;',
words: ['ÖÖÖ']
}
}