@cdc/markup-include
v4.26.4
Published
React component for displaying HTML content from an outside link
Readme
@cdc/markup-include
<CdcMarkupInclude /> renders authored HTML and optional markup variables inside the CDC shell.
The primary configuration reference is CONFIG.md.
Installation
npm install @cdc/markup-includeQuick 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 AppConfiguration
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. |
