1 | import { createElement } from "@wordpress/element";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import { __ } from '@wordpress/i18n';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | import { PlainText } from '@wordpress/block-editor';
|
12 | export default function CodeEdit(_ref) {
|
13 | var attributes = _ref.attributes,
|
14 | setAttributes = _ref.setAttributes,
|
15 | className = _ref.className;
|
16 | return createElement("div", {
|
17 | className: className
|
18 | }, createElement(PlainText, {
|
19 | value: attributes.content,
|
20 | onChange: function onChange(content) {
|
21 | return setAttributes({
|
22 | content: content
|
23 | });
|
24 | },
|
25 | placeholder: __('Write code…'),
|
26 | "aria-label": __('Code')
|
27 | }));
|
28 | }
|
29 |
|
\ | No newline at end of file |