UNPKG

@atlaskit/editor-plugin-breakout

Version:

Breakout plugin for @atlaskit/editor-core

14 lines (13 loc) 566 B
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments'; var supportedNodesForBreakout = ['codeBlock', 'layoutSection', 'expand']; var supportedNodesForBreakoutAdvancedLayouts = ['codeBlock', 'expand']; /** * Check if breakout can be applied to a node * @param node Node to check */ export function isSupportedNodeForBreakout(node) { if (editorExperiment('advanced_layouts', true)) { return supportedNodesForBreakoutAdvancedLayouts.indexOf(node.type.name) !== -1; } return supportedNodesForBreakout.indexOf(node.type.name) !== -1; }