
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@markdown-ui/marked-ext
Advanced tools
Marked extension for markdown-ui widgets.
See markdown-ui Github.
This package provides a Marked.js extension that enables rendering of markdown-ui-widget code blocks as interactive UI components. When markdown contains code blocks with the language markdown-ui-widget, this extension converts them into custom web components.
New! Added support for atom widgets – ultra-lightweight inline controls that render directly in the text flow.
npm install @markdown-ui/marked-ext
import { marked } from 'marked';
import { markedUiExtension } from '@markdown-ui/marked-ext';
// Register the extension
marked.use(markedUiExtension);
// JSON widget syntax
const jsonMarkdown = `
\`\`\`markdown-ui-widget
{
"type": "text-input",
"id": "username",
"label": "Username",
"placeholder": "Enter username"
}
\`\`\`
`;
// DSL syntax (more concise!)
const dslMarkdown = `
\`\`\`markdown-ui-widget
text-input username "Username" "Enter username"
\`\`\`
`;
const html = marked(jsonMarkdown);
console.log(html);
// Output: <markdown-ui-widget id="unique-id" content="base64-encoded-content"></markdown-ui-widget>
This extension supports both JSON and DSL syntax in markdown-ui-widget code blocks:
The extension automatically detects the format - try JSON first, fall back to DSL if JSON parsing fails.
DSL Examples:
text-input username "Username" "Enter username"
button-group env [dev staging prod] dev
select region [us-east-1 us-west-2] us-east-1
slider cpu 1 32 1 4
form config "Submit"
text-input name "Name"
select env [dev prod]
For complete DSL documentation, see @markdown-ui/mdui-lang.
markdown-ui-widget<markdown-ui-widget> custom element with the encoded content and ID, which will require a marked-ui supported renderer.nanoid: Used for generating unique widget IDsmarked: Peer dependency for the Marked.js libraryISC
FAQs
Marked extension for markdown-ui widgets
The npm package @markdown-ui/marked-ext receives a total of 19 weekly downloads. As such, @markdown-ui/marked-ext popularity was classified as not popular.
We found that @markdown-ui/marked-ext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.