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