Table of Contents

Class HtmlWriteOptions

Namespace
DocWright.Formats.Html
Assembly
DocWright.Formats.Html.dll

Format-specific settings for HtmlWriter.

public sealed class HtmlWriteOptions
Inheritance
HtmlWriteOptions
Inherited Members

Constructors

HtmlWriteOptions()

Properties

Indent

Gets or sets a value indicating whether output is indented for readability. False by default: indentation inside a block introduces whitespace text nodes, so an indented document does not re-import to the same DOM as its unindented twin.

Mode

Gets or sets how resources are emitted. Self-contained by default.

NewLine

Gets or sets the line ending. "\n" by default and never the platform's, because output must be byte-identical across operating systems.

ResourceWriter

Gets or sets the resource writer used in Linked mode. Null means images are reported and dropped rather than silently lost.

StylesheetHref

Gets or sets the href written into a <link rel="stylesheet"> in Linked mode. Null emits the styles inline even in linked mode, because a document that references a stylesheet nobody wrote renders unstyled.

StylesheetWriter

Gets or sets a receiver for the generated stylesheet in Linked mode. Null — the default — leaves StylesheetHref in charge.

Title

Gets or sets the document title written into <title>. Null omits the element in XHTML-optional cases and writes an empty one where the syntax requires it.

WriteDirectionAttribute

Gets or sets a value indicating whether right-to-left content is marked with the HTML dir attribute instead of the CSS direction property. False by default.

WriteDocumentShell

Gets or sets a value indicating whether a complete document — doctype, html, head and body — is emitted. True by default; false emits only the body's children, which is what a caller embedding the result in a page wants.

XhtmlSyntax

Gets or sets a value indicating whether output is XHTML rather than HTML: void elements self-close, the root carries the XHTML namespace, and the doctype is omitted.