JSPM

@leeonfield/editor-plugin-video

0.2.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q63623F
  • License MIT

Video Plugin for TOAST UI Editor

Package Exports

  • @leeonfield/editor-plugin-video

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@leeonfield/editor-plugin-video) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Video Plugin for TOAST UI Editor

This is a plugin of TOAST UI Editor to embed video in Editor

npm version

Support video list and code language

📦 Usage npm

To use the plugin, @toast-ui/editor must be installed.

Ref. Getting Started

Install

$ npm install @leeonfield/editor-plugin-video -S

Import Plugin

ES Modules

import videoPlugin from '@leeonfield/editor-plugin-video';

CommonJS

const videoPlugin = require('@leeonfield/editor-plugin-video');

Use in Editor

// ...

import Editor from '@toast-ui/editor';
import videoPlugin from '@leeonfield/editor-plugin-video';

const editor = new Editor({
  // ...
  plugins: [videoPlugin]
});

Use in Viewer

// ...

import Viewer from '@toast-ui/editor/dist/toastui-editor-viewer';
import videoPlugin from '@leeonfield/editor-plugin-video';

// ...

const viewer = new Viewer({
  // ...
  plugins: [videoPlugin]
});

or

// ...

import Editor from '@toast-ui/editor';
import videoPlugin from '@leeonfield/editor-plugin-video';

// ...

const viewer = Editor.factory({
  // ...
  viewer: true,
  plugins: [videoPlugin]
});

Custom Video list

// ...

import Viewer from '@toast-ui/editor/dist/toastui-editor-viewer';
import videoPlugin from '@leeonfield/editor-plugin-video';

// ...

const viewer = new Viewer({
    // ...
    plugins: [
      [
        videoPlugin,
        {
          list: {
            youtube: 'http://player.youku.com/embed/',
          },
        },
      ],
    ],
  });

embed video in markdown

``` youtube
GveTAk727mM
```

video source

```source-mp4
video-source
```