@atlaskit/editor-plugin-interactivity
Version:
Interactivity plugin for @atlaskit/editor-core
11 lines (10 loc) • 645 B
JavaScript
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
import { interactivityPlugin as currentPlugin } from './interactivityPlugin';
import { interactivityPlugin as legacyPlugin } from './legacy/interactivityPlugin';
/**
* Chooses the plugin as the editor creates it.
*
* `legacy/` is the plugin as it was before its collector was made independent of the editor,
* kept unchanged to compare the new one against and to fall back to.
*/
export const interactivityPlugin = params => isExperimentEnabled('platform_editor_interactivity_inp_collector') ? currentPlugin(params) : legacyPlugin(params);