Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DOMParser
    • DOMParser

Index

Constructors

  • new DOMParser(schema: Schema<any, any>, rules: readonly ParseRule[]): DOMParser
  • Create a parser that targets the given schema, using the given parsing rules.

    Parameters

    • schema: Schema<any, any>
    • rules: readonly ParseRule[]

    Returns DOMParser

Methods

  • parse(dom: any, options: any): Node
  • inheritdoc

    Parameters

    • dom: any
    • options: any

    Returns Node

  • #unwrapImages(dom: HTMLElement): void
  • Unwrap any image tags that may have been wrapped in

    tags in earlier iterations of the schema.

    Parameters

    • dom: HTMLElement

      The root HTML element to parse.

    Returns void

  • fromSchema(schema: any): any
  • inheritdoc

    Parameters

    • schema: any

    Returns any