transformer-oembed icon indicating copy to clipboard operation
transformer-oembed copied to clipboard

Width and Height Parameters not compiling

Open wiktor-jurek opened this issue 1 year ago • 0 comments

  • @remark-embedder/transformer-oembed version: 3.0.0
  • node version: 18.15.0
  • npm version: 9.5.0

Relevant code or config

  const { code, frontmatter } = await bundleMDX({
    source: mdxSource,
    mdxOptions(options) {
      options.remarkPlugins = [
        ...(options.remarkPlugins ?? []),
        remarkGfm,
        [
          remarkEmbedder,
          {
            transformers: [
              oembedTransformer,
              {
                params: {
                  theme: "dark",
                  dnt: true,
                  omit_script: true,
                  width: 1000,
                  height: 1000,
                  arguments: { width: 1000, height: 1000 },
                },
              } as Config,
            ],
            handleHTML,
          },
        ],
      ];
      options.rehypePlugins = [...(options.rehypePlugins ?? []), rehypePrism];

      return options;
    },
  });

What you did:

I'm using the plugin with the remark embedded and mdxBundler, and trying to pass a width and height property to my iframe.

What happened:

The Iframe compiles with the default width and height despite me passing it in as a parameter. image

wiktor-jurek avatar Sep 06 '23 14:09 wiktor-jurek