all.. I do know that this question is kind of scattered over the internet, but nothing seems to be pointing me right.
I am making my own wysiwyg and the problem I'm facing is that the code
document.execCommand("fontSize", false, value);
accepts only values from 1 to 7 (inclusive) to be assigned to the "size" attribute of "font" tag. However I need to set the font-size in pixels.
I found this example in a similar stackoverflow question. But the problem with this approach is that it only changes the font-size for the selected text. if you aim to set the font-size before typing your text, it will not work.
Does any one have any idea how I can solve this?