iframe and execCommand

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • am75

    #1

    iframe and execCommand

    Hi everybody,
    I'm developing web pages for content management using iframes, through
    which users can edit html portions... I found execCommand to apply
    simple formats (bold, italic...) to text.
    Is there a command to pass to execCommand for applying a style through
    a class attribute to the text? Does anyone know where can I find a
    reference with all the possible commands to execCommand? And also a
    reference to what is standard and what is not about atrributes and
    methods of the iframe element in javascript?
    And, in your opinions, are iframes (used with the designMode property
    setted on) the best choice for content management?
    Thanks,

    Alessio

  • VK

    #2
    Re: iframe and execCommand

    > where can I find a reference with all[color=blue]
    > the possible commands to execCommand[/color]

    You go to http://www.google.com, type in "execComman d" in the search
    box and press "I'm Feeling Lucky" button. This tricky procedure will
    bring you to:

    <http://msdn.microsoft. com/library/default.asp?url =/workshop/author/dhtml/reference/methods/execcommand.asp >

    ;-)

    [color=blue]
    > a reference to what is standard and what is not
    > about atrributes and methods of the iframe element in javascript[/color]

    <http://www.mozilla.org/docs/dom/domref/dom_frame_ref13 .html>
    Whatever you see there is standard, whatever you don't is
    browser-specific.

    But it really should not bother you as both designMode and execCommand
    are IE-exclusive, so your program will work only under IE and NN 8 (in
    "IE mode") anyway. So you better use this link instead:
    <http://msdn.microsoft. com/library/default.asp?url =/workshop/author/dhtml/reference/objects/iframe.asp>

    Comment

    • Jc

      #3
      Re: iframe and execCommand

      am75 wrote:[color=blue]
      > Hi everybody,
      > I'm developing web pages for content management using iframes, through
      > which users can edit html portions... I found execCommand to apply
      > simple formats (bold, italic...) to text.
      > Is there a command to pass to execCommand for applying a style through
      > a class attribute to the text? Does anyone know where can I find a
      > reference with all the possible commands to execCommand? And also a
      > reference to what is standard and what is not about atrributes and
      > methods of the iframe element in javascript?
      > And, in your opinions, are iframes (used with the designMode property
      > setted on) the best choice for content management?
      > Thanks,
      >
      > Alessio[/color]

      Assuming you can find one that meets your needs, you may want to
      consider using an open source editor, such as ones found at:


      Comment

      • Martin Honnen

        #4
        Re: iframe and execCommand



        VK wrote:
        [color=blue]
        > But it really should not bother you as both designMode and execCommand
        > are IE-exclusive,[/color]

        That is not true, Mozilla since 1.4 supports designMode and execCommand
        for editable iframes.

        --

        Martin Honnen
        http://JavaScript.FAQTs.com/

        Comment

        • VK

          #5
          Re: iframe and execCommand

          > Mozilla since 1.4 supports designMode[color=blue]
          > and execCommand for editable iframes.[/color]

          Oh! I didn't know it. Another "bonus" point for Mozilla Docs.

          Comment

          Working...