/* eslint-disable @typescript-eslint/consistent-type-definitions */
import { Extension } from '@tiptap/core';
const Iframe = Extension.create({
    name: 'iframe',
    addCommands() {
        return {
            setIframe: (options) => ({ commands }) => commands.insertContent([
                {
                    type: 'resizable-media',
                    attrs: {
                        tag: 'iframe',
                        src: options.src,
                        srcdoc: options.srcdoc,
                    },
                },
                { type: 'paragraph' },
            ]),
        };
    },
});
export default Iframe;
