@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
19 lines (18 loc) • 817 B
JavaScript
import createUniversalPresetInternal from '../presets/universal';
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
import { getDefaultPresetOptionsFromEditorProps } from './create-plugins-list';
// Separate file, we should not accidentally import this into the `ComposableEditor`
// otherwise it will blow up the bundle size.
export function createUniversalPreset({
props,
prevProps,
initialPluginConfiguration
}) {
return createUniversalPresetInternal({
appearance: props.appearance,
props: getDefaultPresetOptionsFromEditorProps(props),
initialPluginConfiguration: initialPluginConfiguration,
featureFlags: createFeatureFlagsFromProps(props.featureFlags),
prevAppearance: prevProps === null || prevProps === void 0 ? void 0 : prevProps.appearance
});
}