esthera
09-02-2003, 01:06 AM
I as trying to make a wysiwyg editor. I use the exec commands of ie 5+
To change the font I now do it as the following
function doFont(fName)
{
if(fName != '')
iView.document.execCommand('fontname', false, fName);
}
the selected font list look like this:
<select name="selFont" onChange="doFont(this.options[this.selectedIndex].value)">
<option value="">-- Font --</option>
<option value="Arial">Arial</option>
<option value="Courier">Courier</option>
<option value="Sans Serif">Sans Serif</option>
<option value="Tahoma">Tahoma</option>
<option value="Verdana">Verdana</option>
<option value="Wingdings">Wingdings</option>
</select>
I want to change this to use stylesheets. The text I am changing is in an Iframe?
Any ideas?
To change the font I now do it as the following
function doFont(fName)
{
if(fName != '')
iView.document.execCommand('fontname', false, fName);
}
the selected font list look like this:
<select name="selFont" onChange="doFont(this.options[this.selectedIndex].value)">
<option value="">-- Font --</option>
<option value="Arial">Arial</option>
<option value="Courier">Courier</option>
<option value="Sans Serif">Sans Serif</option>
<option value="Tahoma">Tahoma</option>
<option value="Verdana">Verdana</option>
<option value="Wingdings">Wingdings</option>
</select>
I want to change this to use stylesheets. The text I am changing is in an Iframe?
Any ideas?