2 var STYLE_STR = "text-align: center;",
3 REG_EXP = /(\s|^)text-align\s*:\s*[^;\s]+;?/gi;
5 wysihtml5.commands.alignCenterStyle = {
6 exec: function(composer, command) {
7 return wysihtml5.commands.formatBlock.exec(composer, "formatBlock", null, null, null, STYLE_STR, REG_EXP);
10 state: function(composer, command) {
11 return wysihtml5.commands.formatBlock.state(composer, "formatBlock", null, null, null, STYLE_STR, REG_EXP);