{
iView.document.execCommand('bold', false, null);
}
However, when I try to make my text a heading, that is with h1 to
h6, the command doesn't work. The command for h1 is:
function doHead(hType)
{
if(hType != '')
{
iView.document.execCommand('formatblock', false, hType);
doFont(selFont.options[selFont.selectedIndex].value);
}
}
<select name="selHeading"
onChange="doHead(this.options[this.selectedIndex].value)">
<option value="">-- Heading --</option>
<option value="Heading 1">H1</option>
<option value="Heading 2">H2</option>
<option value="Heading 3">H3</option>
<option value="Heading 4">H4</option>
<option value="Heading 5">H5</option>
<option value="Heading 6">H6</opt
</select>
When I try to select one of the options, say I select h2 from the drop down
nothing happens. If am using the bold text command, that function works
fine?
What is wrong here? Anybody..
Thank you very much for your help.
Regards
Jan T.
> Hi. I am trying to make an WYSIWYG html editor using iframe.
> There is a lot of commands you can use such as
> function doBold()
> {
> iView.document.execCommand('bold', false, null);
> }
That isn't HTML. HTML does not have commands. It is a Markup
Language (that's what the ML in HTML stands for), not a programming
language.
--
Lars Eighner <http://larseighner.com/> Warbama's Afghaninam day: 27
659.5 hours since Warbama declared Viet Nam II.
Warbama: An LBJ for the Twenty-First century. No hope. No change.
> <option value="Heading 6">H6</opt
</opt
... aehm ... not good.
> When I try to select one of the options, say I select h2 from the drop down
> nothing happens.
I don't see the script where it handles value="Heading 1".
Is it for a form?
Most of the time they don't use valid html tags there.