rsnext/examples/with-slate/pages/multiple.js
Corbin Crutchley e03266008c form handler example: Update deps and fix build from dep update (#6732)
* form handler example: Update deps and fix build from dep update

* Ran lint error fixers

* Fixes errors that occur when commit occurs

* Commit linter fixes
2019-03-27 16:12:45 -04:00

31 lines
758 B
JavaScript

import React from 'react'
import Link from 'next/link'
import CustomKeygenEditor from './CustomKeygenEditor'
const content = {
'first-editor':
'This example shows how to have multiple instances of the editor.',
'second-editor': 'Without a custom key generator, you could not focus here.'
}
class MultipleEditors extends React.Component {
render () {
return (
<React.Fragment>
<Link href='/'>
<a>Go to Home</a>
</Link>
{Object.keys(content).map((key, idx) => (
<CustomKeygenEditor
key={idx}
uniqueId={key}
content={content[key]}
style={{ margin: 20 }}
/>
))}
</React.Fragment>
)
}
}
export default MultipleEditors