title: How do I make an execCommand change the font type for my wysiwyg?
body: <p>I can make the font bold using a button but not when choosing fonts using the select tag. I have a series of choices such as Arial, Times, Courier etc. with no way of clicking. This is what the code looks like</p>
  
  <pre><code>function fontEditor(){
  var x=document.getElementById("fontName").selectedIndex;
  var y=document.getElementById("fontName").options;
  document.execCommand(x,"",y);
  edit.document.focus(fontName);
  }
  </code></pre>
  
  <p>Along with this</p>
  
  <pre><code>&lt;select id="fontName" onChange="fontEditor('font',[selectedIndex].value)"&gt;
  &lt;option value="Arial"&gt;Arial&lt;/option&gt;
  &lt;option value="Calibri"&gt;Calibri&lt;/option&gt;
  &lt;option value="Comic Sans MS"&gt;Comic Sans MS&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>