# ghostkit/3.3.3/gutenberg/blocks/markdown/render.js

Block Animations, Motion &amp; Scroll Effects – Ghost Kit, version 3.3.3. 42 lines.

- Page: https://pluginprobe.com/plugins/ghostkit/3.3.3/code/gutenberg/blocks/markdown/render.js
- Raw: https://pluginprobe.com/plugins/ghostkit/3.3.3/raw/gutenberg/blocks/markdown/render.js
- Modified: 2024-02-18T18:40:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ghostkit/3.3.3/code/gutenberg/blocks/markdown/render.js#L10-L20`.

```javascript
import MarkdownIt from 'markdown-it';

import { RawHTML } from '@wordpress/element';
import { __ } from '@wordpress/i18n';

/**
 * Module variables
 */
const markdownConverter = new MarkdownIt();

/**
 * MDRender Class.
 *
 * @param props
 */
export default function MDRender(props) {
	const { content, ...restProps } = props;

	return (
		<RawHTML
			onClick={(e) => {
				if (e.target.nodeName === 'A') {
					if (
						// eslint-disable-next-line no-alert
						!window.confirm(
							__(
								'Are you sure you wish to leave this page?',
								'ghostkit'
							)
						)
					) {
						e.preventDefault();
					}
				}
			}}
			{...restProps}
		>
			{content && content.length ? markdownConverter.render(content) : ''}
		</RawHTML>
	);
}

```
