cudr_slate-collaborative/packages/client/src/renderEditor.tsx

21 lines
353 B
TypeScript
Raw Normal View History

2019-10-05 08:44:49 +00:00
import React from 'react'
import { PluginOptions } from './model'
2019-10-05 08:44:49 +00:00
import Controller from './Controller'
const renderEditor = (opts: PluginOptions) => (
props: any,
editor: any,
next: any
) => {
const children = next()
return (
<Controller {...opts} editor={editor}>
{children}
</Controller>
)
}
export default renderEditor