@@ -1,6 +1,7 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import Textarea from 'react-autosize-textarea';
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import Editor from 'components/Editor';
|
||||
import PublishingInfo from 'components/PublishingInfo';
|
||||
@@ -70,6 +71,7 @@ class DocumentEditor extends React.Component<Props> {
|
||||
offsetLeft={startsWithEmojiAndSpace}
|
||||
readOnly={readOnly}
|
||||
autoFocus={!title}
|
||||
maxlength={100}
|
||||
/>
|
||||
<Meta document={document}>
|
||||
{totalViews && !isDraft ? (
|
||||
@@ -98,7 +100,7 @@ const Meta = styled(PublishingInfo)`
|
||||
font-size: 14px;
|
||||
`;
|
||||
|
||||
const Title = styled('input')`
|
||||
const Title = styled(Textarea)`
|
||||
z-index: 1;
|
||||
line-height: 1.25;
|
||||
margin-top: 1em;
|
||||
@@ -113,6 +115,7 @@ const Title = styled('input')`
|
||||
outline: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
resize: none;
|
||||
|
||||
&::placeholder {
|
||||
color: ${props => props.theme.placeholder};
|
||||
|
||||
Reference in New Issue
Block a user