docbrown/app/javascript/article-form/elements/bodyMarkdown.jsx
Aviskar KC 04ff252b87
Fix the height of new post text area and add scrollbar (#7480)
* Repplace preact-textarea-autosize component with textarea element

* FFix the height of new post textarea and add scrollbar

* Update snapshot

* Change the value used to calculate minimum height of text editor to 82vh

Co-authored-by: rhymes <rhymesete@gmail.com>

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-05-14 12:10:37 +02:00

20 lines
455 B
JavaScript

import { h } from 'preact';
import PropTypes from 'prop-types';
const BodyMarkdown = ({ onChange, defaultValue }) => (
<textarea
className="articleform__body"
id="article_body_markdown"
placeholder="Body Markdown"
value={defaultValue}
onInput={onChange}
name="body_markdown"
/>
);
BodyMarkdown.propTypes = {
onChange: PropTypes.func.isRequired,
defaultValue: PropTypes.string.isRequired,
};
export default BodyMarkdown;