Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MarkdownDocumentOptions

Options for openting a Markdown document.

Hierarchy

  • MarkedOptions
    • MarkdownDocumentOptions

Index

Properties

Optional breaks

breaks: boolean

Enable GFM line breaks. This option requires the gfm option to be true.

Optional css

css: string

Custom CSS.

Optional documentId

documentId: any

Custom document ID.

Optional documentTitle

documentTitle: string

Custom document title.

Optional gfm

gfm: boolean

Enable GitHub flavored markdown.

Optional headerPrefix

headerPrefix: string

Set the prefix for header tag ids.

Optional langPrefix

langPrefix: string

Set the prefix for code block classes.

Optional mangle

mangle: boolean

Mangle autolinks (email@domain.com).

Optional pedantic

pedantic: boolean

Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.

Optional renderer

renderer: Renderer

Type: object Default: new Renderer()

An object containing functions to render tokens to HTML.

Optional sanitize

sanitize: boolean

Sanitize the output. Ignore any HTML that has been input.

Optional silent

silent: boolean

Shows an HTML error message when rendering fails.

Optional smartLists

smartLists: boolean

Use smarter list behavior than the original markdown. May eventually be default with the old behavior moved into pedantic.

Optional smartypants

smartypants: boolean

Use "smart" typograhic punctuation for things like quotes and dashes.

Optional tables

tables: boolean

Enable GFM tables. This option requires the gfm option to be true.

Optional xhtml

xhtml: boolean

Generate closing slash for self-closing tags (
instead of
)

Methods

Optional highlight

  • highlight(code: string, lang: string, callback?: function): string
  • A function to highlight code blocks. The function takes three arguments: code, lang, and callback.

    Parameters

    • code: string
    • lang: string
    • Optional callback: function
        • (error: any | undefined, code: string): void
        • Parameters

          • error: any | undefined
          • code: string

          Returns void

    Returns string

Optional sanitizer

  • sanitizer(html: string): string
  • Optionally sanitize found HTML with a sanitizer function.

    Parameters

    • html: string

    Returns string

Generated using TypeDoc