Skip to content

Commit f3a480e

Browse files
authored
fix(yfmHtmlBlock): added sanitize prop to YfmHtmlBlock wysiwyg extension (#306)
* fix(yfmHtmlBlock): added sanitize prop to YfmHtmlBlock wysiwyg extension
1 parent d620fe7 commit f3a480e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/extensions/yfm/YfmHtmlBlock/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ import {addYfmHtmlBlock} from './actions';
99

1010
export type YfmHtmlBlockOptions = {
1111
useConfig?: () => IHTMLIFrameElementConfig | undefined;
12+
sanitize?: (dirtyHtml: string) => string;
1213
};
1314

1415
export const YfmHtmlBlock: ExtensionAuto<YfmHtmlBlockOptions> = (builder, options) => {
1516
builder.use(YfmHtmlBlockSpecs, {
1617
nodeView: YfmHtmlBlockNodeViewFactory(options),
18+
sanitize: options.sanitize,
1719
});
1820

1921
builder.addAction(YfmHtmlBlockAction, () => addYfmHtmlBlock);

0 commit comments

Comments
 (0)