1 import { html } from '@codemirror/lang-html';
2 import { EditorView } from '@codemirror/view';
3 import PropTypes from 'prop-types';
4 import React from 'react';
5 import { githubDark } from '@uiw/codemirror-theme-github';
6 import CodeMirror from '@uiw/react-codemirror';
13 const handleChange = React.useCallback((value) => {
14 return onChange({ target: { name, value } });
18 extensions={[html(), EditorView.lineWrapping]}
19 onChange={handleChange}
25 HTMLInput.propTypes = {
26 name: PropTypes.string,
27 onChange: PropTypes.func,
28 value: PropTypes.string,
31 export default HTMLInput;