-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Expand file tree
/
Copy pathPluginCapabilities.ts
More file actions
18 lines (16 loc) · 1007 Bytes
/
PluginCapabilities.ts
File metadata and controls
18 lines (16 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict';
// Capability flags exposed to Etherpad plugins for runtime feature detection.
// Plugins should `try { require('ep_etherpad-lite/node/utils/PluginCapabilities') }
// catch { /* old core */ }` and degrade gracefully when a flag is missing.
//
// IMPORTANT: a flag here means the core implements the capability — it does
// not mean the capability is currently enabled on this Etherpad instance.
// Capabilities can be gated by per-instance settings; plugins must inspect
// the relevant runtime flag (typically reflected through clientVars) to
// decide whether to actually use the feature on a given pad load.
// True when applyPadSettings (client + server) preserves keys matching
// /^ep_[a-z0-9_]+$/ on pad.padOptions. The runtime gate is
// settings.enablePluginPadOptions (default true), mirrored to clients via
// clientVars.enablePluginPadOptions. See doc/plugins.md for the full
// contract (key namespace, validation, size caps).
export const padOptionsPluginPassthrough = true;