@atlaskit/editor-plugin-expand
Version:
Expand plugin for @atlaskit/editor-core
28 lines • 809 B
JavaScript
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
import { expandPlugin as legacyExpandPlugin } from './legacyExpand/plugin';
import { expandPlugin as singlePlayerExpandPlugin } from './singlePlayerExpand/plugin';
// Ignored via go/ees005
// eslint-disable-next-line prefer-const
export let expandPlugin = ({
config: options = {},
api
}) => {
if (options !== null && options !== void 0 && options.__livePage) {
return singlePlayerExpandPlugin({
config: options,
api
});
} else {
if (expValEquals('platform_editor_single_player_expand', 'isEnabled', true)) {
return singlePlayerExpandPlugin({
config: options,
api
});
} else {
return legacyExpandPlugin({
config: options,
api
});
}
}
};