Skip to content

Installing Media Embed Plugins #1050

Answered by karthikcodes6
bishoymelek asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @bishoymelek,

First you need to pass the createMediaEmbedPlugin to the plugins and then add element to the components like below.

() => {
  const plugins = [
    createMediaEmbedPlugin(),
  ];

  const components = {
     [ELEMENT_MEDIA_EMBED]: MediaEmbedElement
  }

  return (
    <Plate
      id="media-embed"
      plugins={plugins}
      components={components}
      options={options}
      editableProps={editableProps}
      initialValue={initialValueEmbeds}
    />
  );
}

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@bishoymelek
Comment options

Comment options

You must be logged in to vote
5 replies
@bishoymelek
Comment options

@zbeyens
Comment options

@bishoymelek
Comment options

@zbeyens
Comment options

@bishoymelek
Comment options

Answer selected by bishoymelek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants