Topic: How to set SIZE of background image of text area?
My form allows users to dynamically set a color or image background for their text area. I have it working for color, and I can set an image as the background (the image filename is a session var). However, the image is not being scaled to fit inside the text area box. The commented lines below are methods I guessed at that do not work. Is there any syntax that will work, or another method? If I have to, I can set the background to transparent and then display the image underneath it using z=index, but then I have to get the positioning just right to compensate for the tinyMCE toolbar at the top, and I really don't want to go there!
function ChangeBkgrdImage(editor_id) {
var myEditor = "AdText" + editor_id;
myBkImage = "url(/FilesRestaurants/<?php echo $_SESSION['AdFilenameFO']; ?>)";
//tinyMCE.getInstanceById(myEditor).getWin().document.body.style.background-size: 407px 670px;
//tinyMCE.getInstanceById(myEditor).getWin().document.body.style.backgroundSize: 407px 670px;
tinyMCE.getInstanceById(myEditor).getWin().document.body.style.backgroundImage = myBkImage;
}
Thank you for your thoughts...