/** * Works for both RichTextEditor and JsonRTE * * @param {Object} params - Parameters object * @param {Object} params.editor - The Slate editor instance * @param {Object} params.selectedAsset - The selected asset object with properties: url, uid, description, title, etc. * @param {string} [params.type] - Type of insertion: 'asset' for embedded asset, 'assetLink' for asset as link, undefined or 'image' for regular image * @param {boolean} [params.isInline] - Whether to insert as inline asset (JsonRTE specific, ignored for RichTextEditor) * @param {Function} params.closeModal - Function to close the modal * @param {boolean} [params.isJsonRTE] - Explicitly specify if using JsonRTE (recommended). If not provided, will auto-detect via editor.rteVersion * @param {Object} [params.linkSettings] - Link settings for assetLink type: { displayText, title, openInNewTab } * * @example * // Recommended: Explicitly specify editor type * import { handleRTEAssetSubmit } from '@contentstack/venus-components' * * const handleSelect = () => { * handleRTEAssetSubmit({ * editor, * selectedAsset: selectedAsset, * type: 'asset', * isInline: false, * isJsonRTE: true, // Explicitly specify - cleaner than auto-detection * closeModal: closeModal * }) * } * * // For embedding asset as link: * handleRTEAssetSubmit({ * editor, * selectedAsset: selectedAsset, * type: 'assetLink', * isJsonRTE: true, * linkSettings: { displayText: 'Click here', title: 'Asset title', openInNewTab: true }, * closeModal: closeModal * }) */ interface LinkSettings { displayText?: string; title?: string; openInNewTab?: boolean; } interface HandleRTEAssetSubmitParams { editor: any; selectedAsset: any; type?: string; isInline?: boolean; isJsonRTE?: boolean; closeModal?: () => void; linkSettings?: LinkSettings; } export declare const handleRTEAssetSubmit: ({ editor, selectedAsset, type, isInline, isJsonRTE, closeModal, linkSettings }: HandleRTEAssetSubmitParams) => void; export {};