mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
22 lines
354 B
TypeScript
22 lines
354 B
TypeScript
|
import React from 'react'
|
||
|
|
||
|
import { PluginOptions } from './index'
|
||
|
|
||
|
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
|