@wordpress/block-library
Version:
Block library for the WordPress editor.
22 lines (18 loc) • 365 B
JavaScript
/**
* WordPress dependencies
*/
import { useBlockProps } from '@wordpress/block-editor';
export default function save( { attributes } ) {
const { latex, mathML } = attributes;
if ( ! latex ) {
return null;
}
return (
<div { ...useBlockProps.save() }>
<math
display="block"
dangerouslySetInnerHTML={ { __html: mathML } }
/>
</div>
);
}