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