JS WYSIWYG Editor - Image Alignment...?

Discussion in 'Javascript' started by Edd, Jan 8, 2004.

  1. Edd

    Edd Guest

    Hi,

    I have built a basic WYSIWYG HTML editor using Javascript the
    ExecCommand commands.

    What is fustrating me is that, according to the MSDN site, there is no
    way to set the alignment of an image (eg left, right, middle).

    This MUST be possible using Javascript...and I have thought about
    using the command

    document.iEditor.imagename.style.float = "right"

    BUT...i don't know how to set the 'imagename' above to the image
    currently selected within the editor.

    (FYI 'iEditor' is an iFrame with DesignMode set to 'on')

    If anyone has any ideas about how to go about doing this, it would be
    massively appreciated!!

    Thanks
    Edd
     
    Edd, Jan 8, 2004
    #1
    1. Advertising

  2. Edd wrote:

    > I have built a basic WYSIWYG HTML editor using Javascript the
    > ExecCommand commands.


    Yet another one ...

    > What is fustrating me is that, according to the MSDN site,


    URL?

    > there is no way to set the alignment of an image (eg left, right, middle).


    M$ is lying again. You only need to assign the "align"
    property of an HTMLImageElement object a proper value.

    > This MUST be possible using Javascript...and I have thought about
    > using the command
    >
    > document.iEditor.imagename.style.float = "right"
    > [...]
    > (FYI 'iEditor' is an iFrame with DesignMode set to 'on')


    Quickhack (see <http://pointedears.de.vu/scripts/test/whatami>):

    var oImageStyle = document.frames['iEditor'].images[imagename].style;
    oImageStyle.float = "right";

    > BUT...i don't know how to set the 'imagename' above to the image
    > currently selected within the editor.


    <computer> Please restate your request. </computer>

    > If anyone has any ideas about how to go about doing this, it would be
    > massively appreciated!!


    How much are you going to pay me?


    PointedEars
     
    Thomas 'PointedEars' Lahn, Feb 4, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yoni
    Replies:
    1
    Views:
    309
    Ray Dixon [MVP]
    Jul 30, 2003
  2. Bharat

    WYSIWYG editor in asp.net

    Bharat, Aug 5, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    469
    Colin Young
    Aug 6, 2003
  3. Stylus Studio
    Replies:
    0
    Views:
    681
    Stylus Studio
    Aug 3, 2004
  4. Hatem KNANI
    Replies:
    2
    Views:
    655
    Morphon Technologies
    Aug 4, 2003
  5. I. Myself
    Replies:
    39
    Views:
    2,748
    Chaddy2222
    May 31, 2006
Loading...

Share This Page