texteditorStyles
option to window.edy
configuration object.<script>
window.edy = window.edy || [];
var options = {
name: 'H4',
tagname:'h4'
};
edy.push(['texteditorStyles', options]);
</script>
toggle
is used applying format with the same classname removes format while applying similar classname replaces class with new one. Useful for example in adding text alignment classes:<script>
window.edy = window.edy || [];
var optionsLeft = {
name: 'Align left',
classname: 'text-align-left',
classRegExp: /wysiwyg-text-align-[0-9a-z]+/g,
toggle: true
};
edy.push(['texteditorStyles', optionsLeft]);
var optionsRight = {
name: 'Align right',
classname: 'text-align-right',
classRegExp: /wysiwyg-text-align-[0-9a-z]+/g,
toggle: true
};
edy.push(['texteditorStyles', optionsRight]);
</script>
styleProperty , styleValue - (string) used together to define an inline style property for formatting text:<script>
window.edy = window.edy || [];
var options = {
name: "Justify with style",
styleProperty: "textAlign",
styleValue: "justify",
toggle: true
};
edy.push(['texteditorStyles', options]);
</script>