# learnpress/trunk/assets/src/apps/js/admin/react/question-editor.js

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

- Page: https://pluginprobe.com/plugins/learnpress/trunk/code/assets/src/apps/js/admin/react/question-editor.js
- Raw: https://pluginprobe.com/plugins/learnpress/trunk/raw/assets/src/apps/js/admin/react/question-editor.js
- Modified: 2024-08-10T07:01:34+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/admin/react/question-editor.js#L10-L20`.

```javascript
import Editor from './question/index';
import store from './question/store';

export default Editor;

export const init = function init( elem, settings ) {
	wp.element.render(
		<Editor initSettings={ settings } />,
		jQuery( elem )[ 0 ]
	);
	const $ = jQuery;

	$( document ).on( 'change', '#_lp_blanks_style, #_lp_blank_fills_style', () => {
		wp.data.dispatch( 'learnpress/question' ).setData( {
			blanksStyle: $( '#_lp_blanks_style' ).val(),
			blankFillsStyle: $( '#_lp_blank_fills_style' ).val(),
		}, 'question' );
	} );
};

```
