Back to Content

Summarizer: format property

files/en-us/web/api/summarizer/format/index.md

latest870 B
Original Source

{{APIRef("Summarizer API")}}{{SeeCompatTable}}{{securecontext_header}}

The format read-only property of the {{domxref("Summarizer")}} interface returns the text format summaries will be returned in.

Value

An enumerated value specifying the format of returned summaries. Possible values are:

  • markdown
    • : Summaries contain markdown formatting (conforming to the CommonMark spec).
  • plain-text
    • : Summaries contain no formatting.

Examples

js
const summarizer = await Summarizer.create({
  format: "plain-text",
  // ...
});

// Logs "plain-text"
console.log(summarizer.format);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also