# learnpress/trunk/assets/src/apps/js/blocks/course-elements/course-price/edit.js

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version trunk. 23 lines.

- Page: https://pluginprobe.com/plugins/learnpress/trunk/code/assets/src/apps/js/blocks/course-elements/course-price/edit.js
- Raw: https://pluginprobe.com/plugins/learnpress/trunk/raw/assets/src/apps/js/blocks/course-elements/course-price/edit.js
- Modified: 2026-08-22T04:51:36+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/learnpress/trunk/code/assets/src/apps/js/blocks/course-elements/course-price/edit.js#L10-L20`.

```javascript
import { __ } from '@wordpress/i18n';
import { useBlockProps } from '@wordpress/block-editor';
import { RawHTML } from '@wordpress/element';

const Edit = ( props ) => {
	const { attributes, setAttributes, context } = props;
	const blockProps = useBlockProps();
	const { lpCourseData } = context;
	const coursePrice =
		lpCourseData?.price ||
		'<span class="course-price"><span class="course-item-price"> <span class="origin-price">$5.00</span><span class="price">$4.00</span> </span></span>';

	return (
		<>
			<div { ...blockProps }>
				<RawHTML>{ coursePrice }</RawHTML>
			</div>
		</>
	);
};

export default Edit;

```
