|
|
@@ -16,7 +16,7 @@ declare const interceptorManager: InterceptorManager;
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
- growiRenderer: RendererOptions,
|
|
|
+ rendererOptions: RendererOptions,
|
|
|
markdown?: string,
|
|
|
pagePath?: string,
|
|
|
renderMathJaxOnInit?: boolean,
|
|
|
@@ -28,7 +28,7 @@ type UnstatedProps = Props & { appContainer: AppContainer };
|
|
|
const Preview = React.forwardRef((props: UnstatedProps, ref: RefObject<HTMLDivElement>): JSX.Element => {
|
|
|
|
|
|
const {
|
|
|
- growiRenderer,
|
|
|
+ rendererOptions,
|
|
|
markdown, pagePath,
|
|
|
} = props;
|
|
|
|
|
|
@@ -50,17 +50,17 @@ const Preview = React.forwardRef((props: UnstatedProps, ref: RefObject<HTMLDivEl
|
|
|
if (interceptorManager != null) {
|
|
|
await interceptorManager.process('preRenderPreview', context);
|
|
|
await interceptorManager.process('prePreProcess', context);
|
|
|
- context.markdown = growiRenderer.preProcess(context.markdown, context);
|
|
|
+ context.markdown = rendererOptions.preProcess(context.markdown, context);
|
|
|
await interceptorManager.process('postPreProcess', context);
|
|
|
- context.parsedHTML = growiRenderer.process(context.markdown, context);
|
|
|
+ context.parsedHTML = rendererOptions.process(context.markdown, context);
|
|
|
await interceptorManager.process('prePostProcess', context);
|
|
|
- context.parsedHTML = growiRenderer.postProcess(context.parsedHTML, context);
|
|
|
+ context.parsedHTML = rendererOptions.postProcess(context.parsedHTML, context);
|
|
|
await interceptorManager.process('postPostProcess', context);
|
|
|
await interceptorManager.process('preRenderPreviewHtml', context);
|
|
|
}
|
|
|
|
|
|
setHtml(context.parsedHTML ?? '');
|
|
|
- }, [context, growiRenderer]);
|
|
|
+ }, [context, rendererOptions]);
|
|
|
|
|
|
useEffect(() => {
|
|
|
if (markdown == null) {
|