Closed Stephanevg closed 5 years ago
As I will shortly introduce a depency on PowerShell 5 (Using classes), we have the possibility to use classes, and potentially implement design patterns. For the PSHTML.Document we could perhaps use the composite pattern ? I think it will handle the problematic of the nested HTML elements pretty well, and we will be able to add functionality to every component centrally.
First version of Out-PSHTMLDocument has been added in this commit -> https://github.com/Stephanevg/PSHTML/commit/0e4382ca490a58c18c104168063a73f602915a27
This was actually two points, exporting the HTML content via a cmdlet, and desining the PSHTML.Document object.
I consider the first point done in the commit above. The second point will be tracked here --> https://github.com/Stephanevg/PSHTML/issues/218
Currently each HTML document is exported via the following code on the user's side:
As this works fine, I would like to offer the ability to the end users to use a more 'standard' way of creating such a a document.
I would like to discuss the introduction of an export function, that would allow the following things:
I would imagine something along these lines:
Options
Optionally, I would like to discuss the following:
I would imagine a structure along these lines:
PSHTML.Document
Perhaps also think of adding a
content
on the object, which would contain the content of each HTML tab part. It could potentially, also contain another PSHTML.Document, for nested elements.Some sources for inspiration for the exports: