WIP: Note editing, markdown to html
[oweals/karmaworld.git] / karmaworld / apps / wysihtml5 / static / wysihtml5 / wysihtml-0.4.17 / src / commands / fontSize.js
1 /**
2  * document.execCommand("fontSize") will create either inline styles (firefox, chrome) or use font tags
3  * which we don't want
4  * Instead we set a css class
5  */
6 (function(wysihtml5) {
7   var REG_EXP = /wysiwyg-font-size-[0-9a-z\-]+/g;
8
9   wysihtml5.commands.fontSize = {
10     exec: function(composer, command, size) {
11         wysihtml5.commands.formatInline.execWithToggle(composer, command, "span", "wysiwyg-font-size-" + size, REG_EXP);
12     },
13
14     state: function(composer, command, size) {
15       return wysihtml5.commands.formatInline.state(composer, command, "span", "wysiwyg-font-size-" + size, REG_EXP);
16     }
17   };
18 })(wysihtml5);