Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLFrame

Namespace PSWriteHTML

Allows to inline other HTML files into the current HTML file.

Remarks

Allows to inline other HTML files into the current HTML file. This can be useful if we want to display content from another file.

Examples

Authored help example

EXAMPLE 1


New-HTML {
    New-HTMLSection {
        New-HTMLFrame -SourcePath "$PSSCriptRoot\GPOZaurr.html" -Scrolling Auto
    } -HeaderText 'Test'
    New-HTMLSection {
        New-HTMLFrame -SourcePath "$PSSCriptRoot\GPOZaurr.html" -Scrolling Auto -Height 1500px
    } -HeaderText 'Test'
    New-HTMLSection {
        New-HTMLFrame -SourcePath "C:\Support\GitHub\PSWriteHTML\Examples\Example-Maps\Example-Maps.html"
    } -HeaderText 'Test' -Height 100vh
} -Online -TitleText 'Test Inline' -ShowHTML -FilePath "$PSScriptRoot\Example-InlineHTML01.html" -AddComment
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-HTMLFrame [-EnableLogging] [-FrameBorder <Object>] [-Height <Object>] [-Id <String>] [-Name <String>] [-Scrolling <No|Yes|Auto>] [-SourcePath <String>] [-UseiFrameResizer] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

EnableLogging SwitchParameter optionalposition: namedpipeline: False
Enable logging to Console for debugging purposes when using iFrameResizer (requires UseiFrameResizer).
FrameBorder Object optionalposition: 5pipeline: False
Set the frameborder attribute of the <iframe> element. This attribute specifies whether the frame should have a border. The default value is 0.
Height Object optionalposition: 4pipeline: False
Set the height of the iFrame to static value. This should be used when not using iFrameResizer.
Id String optionalposition: 0pipeline: False
ID of the HTML element. By default it's auto-generated.
Name String optionalposition: 1pipeline: False
Name of the HTML element. By default it's empty.
Scrolling String optionalposition: 3pipeline: Falsevalues: 3
The HTML <iframe> scrolling Attribute is used to specify that whether the scrollbar will be displayed or not in the <Iframe> Element. Basically the scrollbar is used when the content is large than the Iframe Element. Available options are: - auto: It has a default value. The scrollbar appears when needed. - yes: This value shows the scrollbar in the Iframe Element. - no: This value does not show the scrollbar in the Iframe Element.
Possible values: No, Yes, Auto
SourcePath String optionalposition: 2pipeline: False
Path to a file with HTML file to display within iFrame
UseiFrameResizer SwitchParameter optionalposition: namedpipeline: False
Forces HTML inline feature to use iFrameResizer instead of native functionality. For fully functional feature it requires modifying the source HTML file.