How to use the @marp-team/marp-core function in @marp-team/marp-core

To help you get started, we’ve selected a few @marp-team/marp-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marp-team / marp-cli / test / templates / bespoke.ts View on Github external
describe("Bespoke template's browser context", () => {
  const marp = new Marp({
    container: new MarpitElement('div', { id: 'p' }),
  })

  const defaultMarkdown = '# 1\n\n---\n\n## 2\n\n---\n\n### 3'

  const render = (
    md = defaultMarkdown,
    targetDocument = document
  ): HTMLElement => {
    targetDocument.body.innerHTML = marp.render(md).html
    return targetDocument.getElementById('p')!
  }

  const replaceLocation = >(
    path: string,
    action: () => T

@marp-team/marp-core

The core of Marp tools

MIT
Latest version published 2 months ago

Package Health Score

79 / 100
Full package analysis