Skip to content

Commit

Permalink
Fix renderBlock() in paste-html example (ianstormtaylor#2934)
Browse files Browse the repository at this point in the history
* Fix renderBlock() in paste-html example

It appears that render block is missing a case for rendering `paragraph`. Without this paragraphs are being rendered as `<div>`s.

* Fixed lint error
  • Loading branch information
nareshbhatia authored and ianstormtaylor committed Aug 19, 2019
1 parent 5686c3d commit 4369f3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/paste-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ class PasteHtml extends React.Component {
const { attributes, children, node, isFocused } = props

switch (node.type) {
case 'paragraph':
return <p {...attributes}>{children}</p>
case 'quote':
return <blockquote {...attributes}>{children}</blockquote>
case 'code':
Expand Down

0 comments on commit 4369f3f

Please sign in to comment.