Frontend API

Main entry point of frontend API to register new content element types.

Members
frontend.contentElementTypes
frontend.widgetTypes

Editor API

Main entry point of editor API to register new content element types.

Members
editor.contentElementTypes

Components

React components for building content elements.

Members
<AudioPlayer audioFile posterImageFile? defaultTextTrackFileId? load? props />
<ContentElementBox children />
<ContentElementFigure configuration children />
<Figure children caption onCaptionChange addCaptionButtonVisible captionButtonPosition addCaptionButtonPosition />
<FitViewport file? aspectRatio? opaque? fill? scale = 1 children />
<Image imageFile variant? load? structuredData? preferSvg? fill props />
<Text inline? scaleCategory children />
<ThemeIcon name width height />
ThirdPartyOptIn
ThirdPartyOptOutInfo
<VideoPlayer videoFile posterImageFile? defaultTextTrackFileId? load? fit? props />

Hooks

React hooks to obtain entry data.

Members
useAdditionalSeedData(name)
useAudioFocus(options)
useContentElementEditorState()
useContentElementLifecycle(options, onActivate, onDeactivate)
useCurrentChapter()
useCredits()
useDarkBackground()
useEntryMetadata()
useFile(options)
useFileRights()
useI18n($0, options?, locale)
useIsStaticPreview()
useLegalInfo()
useMediaMuted()
usePortraitOrientation(options)
useShareProviders($0)
useShareUrl()
useTheme()

Frontend Helpers

Helper functions that can be used in content elements.

Members
paletteColor(value)

Spec Support

Helper functions to use in specs.

Members
normalizeSeed(options = {})
renderInEntry(ui, options = {})
renderInContentElement(ui, options?, callback)
renderHookInEntry(callback, options = {})

Storybook Support

Helper functions to use in content element stories.

Members
filePermaId(collectionName, testReferenceName)
storiesOfContentElement(module, options, typeName, baseConfiguration, variants, consent)

renderInEntryWithContentElementLifecycle

Takes the same options as renderInEntry but returns additional helper function to the return value of the `useContentElementLifecycle` hook:

const {simulateScrollPosition} = renderInEntry(...)
simulateScrollPosition('near viewport')
// => Turns `shouldLoad` and `shouldPrepare` to true
renderInEntryWithContentElementLifecycle(ui: any, options: any)
Parameters
ui (any)
options (any)