How to read <body> tag contents

Last post 07-15-2007, 10:30 PM by fredd. 2 replies.
Sort Posts: Previous Next
  •  07-14-2007, 6:45 PM 31542

    How to read <body> tag contents

    ?
     
    How do I find out what the margins, background colors and other things in the <body> section are?  I need to know in javascript how to determine the margin settings.
     
    Also, how to set margins in the current editor's document content using javascript?
     
    Where is PageProperties property in the editor?
  •  07-15-2007, 7:16 AM 31556 in reply to 31542

    Re: How to read <body> tag contents

    Hi Fredd.
     
    You can set the margin, etc in JavaScript using the style attribute of the body:
     
    editor.GetDocument().body.style
      
    However the values returned will be null if they are applied using an external stylesheet.
     
    More info in style attributes in JS.
     
    Thanks,
    Ady
  •  07-15-2007, 10:30 PM 31564 in reply to 31556

    Re: How to read <body> tag contents

    Perfect, mate...
     
    Thanks a lot
     
    Fredd
View as RSS news feed in XML