mimekit-ts - v1.0.0
    Preparing search index...

    Class HtmlWriter

    An HTML writer.

    Index
    • Create an HTML writer using the specified text writer.

      Parameters

      • output: TextWriter

        The output text writer.

      • OptionalleaveOpen: boolean

        true to leave the output writer open when disposed; otherwise, false.

      Returns HtmlWriter

      output is null or undefined.

    • Create an HTML writer for the specified stream.

      Parameters

      • stream: Stream

        The output stream.

      • encoding: unknown

        The encoding to use for the output.

      • OptionalleaveOpen: boolean

        true to leave the stream open when disposed; otherwise, false.

      Returns HtmlWriter

      stream or encoding is null or undefined.

    • Write the attribute to the output.

      Parameters

      Returns void

      attribute is null or undefined, the writer is disposed, or the writer state does not allow attributes.

    • Write the attribute to the output.

      Parameters

      • idOrName: string

        The attribute identifier or name.

      • value: string

        The attribute value.

      Returns void

      idOrName or value is invalid, the writer is disposed, or the writer state does not allow attributes.

    • Write the attribute to the output using a range of the value.

      Parameters

      • idOrName: string

        The attribute identifier or name.

      • buffer: string

        A buffer containing the attribute value.

      • index: number

        The starting index of the attribute value.

      • count: number

        The number of characters in the attribute value.

      Returns void

      idOrName or buffer is invalid, the writer is disposed, or the writer state does not allow attributes.

      index and count do not specify a valid range.

    • Write the attribute name to the output.

      Parameters

      • idOrName: string

        The attribute identifier or name.

      Returns void

      idOrName is invalid, the writer is disposed, or the writer state does not allow attributes.

    • Write the attribute value to the output.

      Parameters

      • value: string

        The attribute value.

      Returns void

      value is null or undefined, the writer is disposed, or the writer state does not allow attribute values.

    • Write a range of an attribute value to the output.

      Parameters

      • buffer: string

        A buffer containing the attribute value.

      • index: number

        The starting index of the attribute value.

      • count: number

        The number of characters in the attribute value.

      Returns void

      buffer is null or undefined, the writer is disposed, or the writer state does not allow attribute values.

      index and count do not specify a valid range.

    • Write an empty element tag to the output.

      Parameters

      • idOrName: string

        The tag identifier or name.

      Returns void

      idOrName is invalid or the writer is disposed.

    • Write an end tag to the output.

      Parameters

      • idOrName: string

        The tag identifier or name.

      Returns void

      idOrName is invalid or the writer is disposed.

    • Write markup text to the output without HTML-encoding it.

      Parameters

      • value: string

        The markup text.

      Returns void

      value is null or undefined, or the writer is disposed.

    • Write a range of markup text to the output without HTML-encoding it.

      Parameters

      • buffer: string

        A buffer containing markup text.

      • index: number

        The starting index of the markup text.

      • count: number

        The number of characters in the markup text.

      Returns void

      buffer is null or undefined, or the writer is disposed.

      index and count do not specify a valid range.

    • Write a start tag to the output.

      Parameters

      • idOrName: string

        The tag identifier or name.

      Returns void

      idOrName is invalid or the writer is disposed.

    • Write HTML-encoded text to the output.

      Parameters

      • value: string

        The text to write.

      Returns void

      value is null or undefined, or the writer is disposed.

    • Write a range of HTML-encoded text to the output.

      Parameters

      • buffer: string

        A buffer containing text.

      • index: number

        The starting index of the text.

      • count: number

        The number of characters in the text.

      Returns void

      buffer is null or undefined, or the writer is disposed.

      index and count do not specify a valid range.

    • Format and write HTML-encoded text to the output.

      Parameters

      • format: string

        The format string.

      • ...args: unknown[]

        The format arguments.

      Returns void

    • Write an HTML token to the output.

      Parameters

      Returns void

      token is null or undefined, or the writer is disposed.

    • Flush any remaining state to the output.

      Returns void

      The writer has been disposed.