Iframe
^do( Iframe, notename )^
Type: Macro
Purpose: Embeds a webpage in an iframe
The Iframe macro inserts a mini version of the html page exported by notename. Make sure that notename exports as its own page. To do this, consider adding OWNPAGE to its $blogExpOpt
.
You can see how I modified the macro to help with this online documentation: if the note’s $blogButtonTop
contains the keyword PROTO, the Iframe gets an explanatory title.
Hover below to reveal BoxPress code
^if($blogButtonTop("$1"))^<p class="before-pre m-t-32">^if($blogButtonTop("$1").contains("PROTO"))^Export of ^value($Prototype("$1"))^ as webpage: ^else^^value($blogButtonTop("$1"))^^endIf^</p>^endIf^<iframe class="frame-webpage" src="^root^^value($HTMLExportPath("$1"))^"></iframe>
Iframe sample
This is the markup that is rendered below
^do(Iframe, "I am a sample normal_note")^
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Export of normal_note as webpage:
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.