PSWriteHTML icon indicating copy to clipboard operation
PSWriteHTML copied to clipboard

New-HTMLTableStyle for EmailTable

Open RobCannon opened this issue 4 years ago • 1 comments

I am trying to change the header style of a table generated for an email. For example:

$Table = Get-ChildItem | Select-Object -First 5 -Property Name, Length, LastWriteTime

$Output = EmailBody {
  New-HTMLTableStyle -Type Content -BackgroundColor red -TextColor white
  EmailTable -Table $Table
}
Save-HTML -FilePath $PSScriptRoot\Test.html -ShowHTML -HTML $Output

But I don't see any style changes in the output. Since EmailTable is just an alias for New-HTMLTable, I thought that might work. Is that supposed to be supported?

RobCannon avatar Apr 04 '21 16:04 RobCannon

EmailTable Styles are not supported yet. It's a good request, but a completely different CSS is required. I still need to revisit the styling of tables as currently that forces styles all over the place, and I would like to make it granular as well.

PrzemyslawKlys avatar Apr 04 '21 16:04 PrzemyslawKlys