From f76a00acdc5d89e1a4b43558ad8bd6b310653872 Mon Sep 17 00:00:00 2001 From: Matthew Steedman Date: Sat, 11 May 2019 21:52:09 -0400 Subject: [PATCH] Replace renderNode with renderBlock (#2762) --- docs/walkthroughs/defining-custom-block-nodes.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/walkthroughs/defining-custom-block-nodes.md b/docs/walkthroughs/defining-custom-block-nodes.md index 20a5148af..593c2ccda 100644 --- a/docs/walkthroughs/defining-custom-block-nodes.md +++ b/docs/walkthroughs/defining-custom-block-nodes.md @@ -89,18 +89,18 @@ class App extends React.Component { render() { return ( - // Pass in the `renderNode` prop... + // Pass in the `renderBlock` prop... ) } - // Add a `renderNode` method to render a `CodeNode` for code blocks. - renderNode = (props, editor, next) => { + // Add a `renderBlock` method to render a `CodeNode` for code blocks. + renderBlock = (props, editor, next) => { switch (props.node.type) { case 'code': return @@ -148,12 +148,12 @@ class App extends React.Component { value={this.state.value} onChange={this.onChange} onKeyDown={this.onKeyDown} - renderNode={this.renderNode} + renderBlock={this.renderBlock} /> ) } - renderNode = (props, editor, next) => { + renderBlock = (props, editor, next) => { switch (props.node.type) { case 'code': return @@ -206,12 +206,12 @@ class App extends React.Component { value={this.state.value} onChange={this.onChange} onKeyDown={this.onKeyDown} - renderNode={this.renderNode} + renderBlock={this.renderBlock} /> ) } - renderNode = (props, editor, next) => { + renderBlock = (props, editor, next) => { switch (props.node.type) { case 'code': return