Hello community,
recently I stumbled upon a script which is able to adjust the size of an
Iframe to the content.
Because I like to work with external files like etherpads for
interaction, this would make a lot of things possible.
Here's a Demo https://css-tricks.com/examples/iFrameResize/crossdomain.php#
|<script type="application/javascript">
function resizeIFrameToFitContent( iFrame) {
iFrame.width= iFrame.contentWindow.document.body.scrollWidth;
iFrame.height= iFrame.contentWindow.document.body.scrollHeight;
}
window.addEventListener('DOMContentLoaded', function(e) {
var iFrame= document.getElementById( 'iFrame1' );
resizeIFrameToFitContent( iFrame);
// or, to resize all iframes:
var iframes= document.querySelectorAll("iframe");
for( var i= 0; i< iframes.length; i++) {
resizeIFrameToFitContent( iframes[i] );
}
} );
</script>
<iframe src="usagelogs/default.aspx" id="iFrame1"></iframe>|
I wonder if this could be implemented to tiddlywiki.
Two things to change
-It needs to hav flexible Ids to allow multiple instances.
-width should be fixed only the height should adapt.
What do you think, is this possible?
Best wishes Jan
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/5F52B59B.7040308%40googlemail.com.