Currently when I place an image or video within a text box, the text box breaks.
Is there a workaround for this?
Apologies for the cryptic bug report.
I am currently trying to include a video within a p block, where the block has a background style applied to it.
Unfortunately the background colour breaks when the video view is rendered. I hope this is clearer.
Firstly: your way of specifying the padding is not correct. It's missing the px.
So my example looks like this:
<p style="background-color:#aabbcc;padding:10px 10px 10px 10px;"> Some text here<br/>
<video width="320" height="240" src="http://shapeshed.com/examples/HTML5-video-element/video/320x240.m4v" loop="loop" x-webkit-airplay="allow" controls="controls">
Your browser doesn't support the video tag. You can <a href="http://shapeshed.com/examples/HTML5-video-element/video/320x240.m4v">download the video here.</a>
Some more text
This results in this display:
I take it that you see the same and your question really is, how you can get the video to stay inside the bounds of the box, including the padding.
There is no dynamic sizing yet. So you would have to specify the correct display size of the video DTTextAttachment.
Maybe some day, we can implement dynamic sizing of text attachment custom views based on the current available space. I'll leave this issue open as known issue since this is a great use case for when we will implement this.
Unfortunately no, I don't see the same.
I will do some more investigating to see if I can isolate the problem.
Thankyou for pointing out the correct way to specify padding, although that line was copied from the Demo App Snippets, Text Boxes example.