# speechkit/7.0.0/src/editor/components/add-player/index.js

BeyondWords – AI audio for publishers, version 7.0.0. 47 lines.

- Page: https://pluginprobe.com/plugins/speechkit/7.0.0/code/src/editor/components/add-player/index.js
- Raw: https://pluginprobe.com/plugins/speechkit/7.0.0/raw/src/editor/components/add-player/index.js
- Modified: 2026-08-12T09:46:22+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/speechkit/7.0.0/code/src/editor/components/add-player/index.js#L10-L20`.

```javascript
/**
 * WordPress dependencies
 */
import { registerBlockType } from '@wordpress/blocks';
import { useBlockProps } from '@wordpress/block-editor';
import { Placeholder } from '@wordpress/components';
import { __ } from '@wordpress/i18n';

/**
 * Internal dependencies
 */
import { BeyondwordsIcon } from '../icon';

registerBlockType( 'beyondwords/player', {
	icon: <BeyondwordsIcon />,
	edit: function Edit() {
		const blockProps = useBlockProps();

		// The live player only renders on the front end; show a static
		// Placeholder marking where it will appear.
		return (
			<div { ...blockProps }>
				<Placeholder
					icon={ <BeyondwordsIcon /> }
					label={ __( 'BeyondWords Player', 'speechkit' ) }
					instructions={ __(
						'The BeyondWords audio player will appear here.',
						'speechkit'
					) }
				/>
			</div>
		);
	},
	save: function Save() {
		const blockProps = useBlockProps.save( { contentEditable: false } );

		return (
			<div { ...blockProps }>
				<div
					data-beyondwords-player="true"
					contentEditable="false"
				></div>
			</div>
		);
	},
} );

```
