import { ApplySchemaAttributes, CommandFunction, CustomHandlerKeyList, DefaultExtensionOptions, HandlerKeyList, NodeExtension, NodeExtensionSpec, ProsemirrorAttributes, Static, StaticKeyList } from '@remirror/core'; export interface IframeOptions { /** * The default source to use for the iframe. */ defaultSource?: Static; /** * The class to add to the iframe. * * @defaultValue 'remirror-iframe' */ class?: Static; } export declare type IframeAttributes = ProsemirrorAttributes<{ src: string; frameBorder?: number | string; allowFullScreen?: 'true'; width?: string | number; height?: string | number; type?: 'custom' | 'youtube'; }>; /** * An extension for the remirror editor. */ export declare class IframeExtension extends NodeExtension { static readonly staticKeys: StaticKeyList; static readonly handlerKeys: HandlerKeyList; static readonly customHandlerKeys: CustomHandlerKeyList; static readonly defaultOptions: DefaultExtensionOptions; get name(): "iframe"; createNodeSpec(extra: ApplySchemaAttributes): NodeExtensionSpec; /** * Provides the commands for the iFrame extension. */ createCommands: () => { /** * Add a custom iFrame to the editor. */ addIframe: (attributes: IframeAttributes) => CommandFunction; /** * Add a YouTube embedded iFrame to the editor. */ addYouTubeVideo: (parameter: CreateYouTubeIframeParameter) => CommandFunction; /** * Update the iFrame source for the currently selected video. */ updateIframeSource: (src: string) => CommandFunction; /** * Update the YouTube video iFrame. */ updateYouTubeVideo: (parameter: CreateYouTubeIframeParameter) => CommandFunction; }; /** * Creates the command for adding an iFrame to the editor. */ private readonly addIframe; /** * The command for adding a YouTube iframe. */ private readonly addYouTubeVideo; /** * Creates the command for updating the iFrame source. */ private readonly updateIframeSource; private readonly updateYouTubeVideo; } interface CreateYouTubeIframeParameter { /** * The video id (dQw4w9WgXcQ) or full link (https://www.youtube.com/watch?v=dQw4w9WgXcQ). */ video: string; /** * The number os seconds in to start at. * @defaultValue `0` */ startAt?: number; /** * When true will show the player controls. * * @defaultValue `true` */ showControls?: boolean; /** * According to YouTube: _When you turn on privacy-enhanced mode, YouTube * won't store information about visitors on your website unless they play the * video._ * * @defaultValue `true` */ enhancedPrivacy?: boolean; } export {};