Problems making online web editor?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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);

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);

<select name="selHeading"
      <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

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

What is wrong here? Anybody..

Thank you very much for your help.

Jan T.

Re: Problems making online web editor?

In our last episode,
the lovely and talented Jan T.
broadcast on alt.html:

Quoted text here. Click to load it

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

  Lars Eighner < 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.

Re: Problems making online web editor?

On Dec 29 2009, 11:56=A0am, "Jan T." <noreply> wrote:

Quoted text here. Click to load it
... aehm ... not good.

Quoted text here. Click to load it

I don't see the script where it handles value=3D"Heading 1".

Is it for a form?
Most of the time they don't use valid html tags there.

Site Timeline