We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a13a60 commit d620fe7Copy full SHA for d620fe7
src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/index.tsx
@@ -9,14 +9,15 @@ export {yfmHtmlBlockNodeName} from './const';
9
10
export type YfmHtmlBlockSpecsOptions = {
11
nodeView?: ExtensionNodeSpec['view'];
12
+ sanitize?: (dirtyHtml: string) => string;
13
};
14
15
const YfmHtmlBlockSpecsExtension: ExtensionAuto<YfmHtmlBlockSpecsOptions> = (
16
builder,
- {nodeView},
17
+ {nodeView, sanitize},
18
) => {
19
builder
- .configureMd((md) => md.use(transform({bundle: false}), {}))
20
+ .configureMd((md) => md.use(transform({bundle: false, sanitize}), {}))
21
.addNode(YfmHtmlBlockConsts.NodeName, () => ({
22
fromMd: {
23
tokenSpec: {
0 commit comments