Skip to main content
Version: 1.0.0

Media Manager Plugin

MediaManagerPlugin powers image/video insertion and media-library workflows.

Install and import

import {
MediaManagerPlugin,
setMediaManagerConfig,
getMediaManagerConfig,
} from "@editora/plugins";
// or subpath: "@editora/plugins/media-manager"

Usage

setMediaManagerConfig({
apiUrl: "https://api.example.com",
apiEndpoints: {
upload: "/media/upload",
library: "/media/library",
delete: "/media/library",
},
maxFileSize: 10 * 1024 * 1024,
allowedTypes: ["image/jpeg", "image/png", "video/mp4"],
});

const plugins = [MediaManagerPlugin()];

Command Matrix

ActionCommandShortcutToolbar
Insert imageinsertImageMod-Shift-iImage
Insert videoinsertVideoNoneVideo

Config Options

OptionTypeDefaultNotes
apiUrlstringEmpty/localBase API URL
apiEndpoints.uploadstringPlugin defaultUpload endpoint
apiEndpoints.librarystringPlugin defaultMedia list endpoint
apiEndpoints.deletestringPlugin defaultDelete endpoint
maxFileSizenumber10MBPer-file limit
allowedTypesstring[]Common image/video MIME typesUpload type guard
headersRecord<string,string>{}Auth/custom headers

Behavior

  • Resolves active editor context before opening dialog
  • Supports API-backed upload/list/delete workflows
  • Inserts selected media into current editor selection flow

Validation checklist

  • Upload and insert for allowed types
  • Correct instance targeting in multi-editor pages
  • Dialog/picker styles consistent in light/dark themes