@wordpress/block-library
Version:
Block library for the WordPress editor.
21 lines (18 loc) • 369 B
JavaScript
/**
* WordPress dependencies
*/
import { RichText, useBlockProps } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import { escape } from './utils';
export default function save( { attributes } ) {
return (
<pre { ...useBlockProps.save() }>
<RichText.Content
tagName="code"
value={ escape( attributes.content ) }
/>
</pre>
);
}