Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/view/hocs/withYfmHtml/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type WithYfmHtmlBlockOptions = {
export type WithYfmHtmlBlockProps = {
meta: TransformMeta;
yfmHtmlBlockConfig?: IHTMLIFrameElementConfig;
/** Works only with html-extension dep version 2.7.1 and higher */
htmlRuntimeConfig?: HTMLRuntimeConfig;
};

Expand Down
3 changes: 2 additions & 1 deletion src/view/hocs/withYfmHtml/useYfmHtmlBlockRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export function useYfmHtmlBlockRuntime(
htmlRuntimeConfig: HTMLRuntimeConfig = {},
) {
if (meta?.script?.includes(runtime)) {
setupRuntimeConfig(htmlRuntimeConfig);
// MAJOR: update html-extension peer on ^2.7.1 and remove optional chain
setupRuntimeConfig?.(htmlRuntimeConfig);
import(/* webpackChunkName: "yfm-html-runtime" */ '@diplodoc/html-extension/runtime');
}
}
Loading