/** * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ import { type ReactNode, type ComponentType } from 'react'; import type { CKEditorCloudConfig, CKEditorCloudResult } from '@ckeditor/ckeditor5-integrations-common'; /** * HOC that injects the CKEditor Cloud integration into a component. * * @template A The type of the additional resources to load. * @param config The configuration of the CKEditor Cloud integration. * @returns A function that injects the CKEditor Cloud integration into a component. * @example * ```tsx * const withCKCloud = withCKEditorCloud( { * cloud: { * version: '42.0.0', * translations: [ 'es', 'de' ], * premium: true * } * } ); * * const MyComponent = withCKCloud( ( { cloud } ) => { * const { Paragraph } = cloud.CKEditor; * const { SlashCommands } = cloud.CKEditorPremiumFeatures; * const { YourPlugin } = cloud.CKPlugins; * * return
(WrappedComponent: ComponentType