mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-24 09:13:24 +01:00
Update applying-custom-formatting.md (#2843)
This commit is contained in:
parent
52027ff270
commit
5f26890ff9
@ -35,12 +35,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 <CodeNode {...props} />
|
||||
@ -94,12 +94,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 <CodeNode {...props} />
|
||||
@ -166,14 +166,14 @@ class App extends React.Component {
|
||||
value={this.state.value}
|
||||
onChange={this.onChange}
|
||||
onKeyDown={this.onKeyDown}
|
||||
renderNode={this.renderNode}
|
||||
renderBlock={this.renderBlock}
|
||||
// Add the `renderMark` prop...
|
||||
renderMark={this.renderMark}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
renderNode = (props, editor, next) => {
|
||||
renderBlock = (props, editor, next) => {
|
||||
switch (props.node.type) {
|
||||
case 'code':
|
||||
return <CodeNode {...props} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user