This Knowledge Base article only applies to premium Editor's Desk accounts. A premium level account allows for customization of the HTML, CSS, and JavaScript of your widgets. If you'd like more information about how you can take advantage of this more robust version of Editor's Desk, please contact Craig Lachman. His contact information is included in the confirmation email that was sent to you when you signed up for a basic Editor's Desk account.
Many posts come with images embedded in the descriptions. These images can be problematic for a widget. For instance they might be too big to fit within your layout. However, it's possible to fix these images using the processTags modifier.
Let's say you want to make any images in the description be 50 pixels wide. First, define this function in the Javascript section of the widget.
function ng_fixImages(tag)
{
if(tag.tagName.toLowerCase() == "img")
{
tag.style.width = "50px";
}
}
Then go to the HTML section of the widget and apply that function. For instance, if your widget has a line like this:
${Post.Description}
You would change it to:
${Post.Description|processTags:ng_fixImages}
With a little more work you could achieve other effects. For instance, you could hide all but the first image.