EvotecIT / PSWriteHTML

PSWriteHTML is PowerShell Module to generate beautiful HTML reports, pages, emails without any knowledge of HTML, CSS or JavaScript. To get started basics PowerShell knowledge is required.
MIT License
826 stars 106 forks source link

New-HTMLTableStyle for EmailTable #220

Open RobCannon opened 3 years ago

RobCannon commented 3 years ago

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?

PrzemyslawKlys commented 3 years ago

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.