npm.io
4.26.7 • Published 2 months ago

@cdc/markup-include

Licence
Apache-2.0
Version
4.26.7
Deps
5
Size
1.1 MB
Vulns
0
Weekly
0
Stars
55

@cdc/markup-include

npm

<CdcMarkupInclude /> renders authored HTML and optional markup variables inside the CDC shell. The primary configuration reference is CONFIG.md.

Installation

npm install @cdc/markup-include

Quick Start

Use the package by passing a config object directly:

import CdcMarkupInclude from '@cdc/markup-include'

const config = {
  type: 'markup-include',
  version: '4.26.4',
  theme: 'theme-blue',
  contentEditor: {
    inlineHTML: '<p>Markup include minimum example.</p>',
    srcUrl: '',
    title: 'Markup Include',
    useInlineHTML: true
  }
}

function App() {
  return <CdcMarkupInclude config={config} />
}

export default App

Configuration

The primary reference for authoring configs is CONFIG.md.

If you are reading this in a context where relative Markdown links do not open correctly, use the GitHub copy of the markup include config reference.

Properties

Property Type Description
config object Markup include configuration object.
configUrl string Optional URL to a JSON config file fetched at runtime.