Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 1.12 KB

video.md

File metadata and controls

72 lines (53 loc) · 1.12 KB

Video extension

Use this extension to render Video element. The extension uses Plyr as the playback interface.

Options

HTMLAttributes

Custom HTML attributes that should be added to the rendered HTML tag.

Video.configure({
  HTMLAttributes: {
    class: "my-custom-class",
  },
});

dictionary

If you need to internationalize this extension, you can use this option.

Video.configure({
  dictionary: {
    name: "Video",
    inputSrc: "Enter or paste link",
    inputAlt: "Video description",
    inputTitle: "Video title",
    videoOpen: "Open video",
    videoUpload: "Upload video",
    videoDelete: "Delete video",
  },
});

inline

Whether to set the video extension to inline mode.

Video.configure({
  inline: false,
});

Commands

setVideo()

Insert a new video element.

editor.commands.setVideo({
  src: "https://example.com",
  title: "example title",
  align: "center",
  width: "100px"
});

InputRules

:video{https://example.com}

Markdown

:video{https://example.com}