1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-slate/pages/multiple.js

26 lines
696 B
JavaScript
Raw Normal View History

2019-01-11 12:48:46 +00:00
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