Skip to main content

Syntax

Description

Creates a new instance of TurndownService with optional configuration. The constructor can be called with or without the new keyword.

Parameters

object
Configuration object to customize the conversion behavior

Returns

TurndownService
A new TurndownService instance configured with the provided options

Examples

Basic Usage

With Options

Without new Keyword

Notes

  • The constructor automatically returns a new instance even if called without the new keyword
  • All options have sensible defaults based on CommonMark specification
  • Options can be accessed later via turndownService.options