An Article webview enables you to create webview content in a long readable format, similar to an article or blog post.

Example usage

const url = await webview.article.create({
    ref: 'news-item',
    title: 'Hello world',
    content: `Lorem ipsum dolor sit amet, consectetur adipiscing elit.`
  })

You can use Markdown to format text within the content property. This enables you to utilize a more writer-friendly text formatting option that makes it easy to add headings, lists, minor text formatting, and more.

const url = await webview.article.create({
    ref: 'article',
    title: 'Hello world',
    content: `
      # Title

      A simple paragraph with text

      ## Heading 2

      - List item 1
      - List item 2
      - List item 3
`
  })

Properties

PropertyTypeExampleDescription
refstringnews-article(Optional) Updates reference by its unique ID.
titlestringSelect productRequired. Descriptive titles shown at the top of the webview, much like an article title in a blog or news site.
contentstringLoren ipsum dolor....Required. Markdown-supported content. This is the body of your article.