Various editor fixes (#160)

* Tab should move to body from heading

* Focus editor on mount, closes #156

* Closes #154 - Just went for the simple approach here, considered something more complex but this is clear

* Added body placeholder
This commit is contained in:
Tom Moor
2017-07-17 09:03:29 -07:00
committed by GitHub
parent e0d5d1bbbe
commit b6616cd05a
7 changed files with 88 additions and 11 deletions

View File

@ -5,6 +5,7 @@ import Image from './components/Image';
import Link from './components/Link';
import ListItem from './components/ListItem';
import Heading from './components/Heading';
import Paragraph from './components/Paragraph';
import type { Props, Node, Transform } from './types';
import styles from './Editor.scss';
@ -25,7 +26,7 @@ const createSchema = ({ onStar, onUnstar }: Options) => {
},
nodes: {
paragraph: (props: Props) => <p>{props.children}</p>,
paragraph: (props: Props) => <Paragraph {...props} />,
'block-quote': (props: Props) => (
<blockquote>{props.children}</blockquote>
),