EmbedShapeOptions

See source code
Table of contents

Extends ShapeOptionsWithDisplayValues<TLEmbedShape, EmbedShapeUtilDisplayValues>.

interface EmbedShapeOptions extends ShapeOptionsWithDisplayValues<
  TLEmbedShape,
  EmbedShapeUtilDisplayValues
> {}

Properties

embedConfig

readonlyoptional

Per-embed configuration, keyed by embed type. Passed to each definition's toEmbedUrl when building its embed URL — for example, an API key for the default Google Maps embed:

EmbedShapeUtil.configure({ embedConfig: { google_maps: { apiKey: "..." } } });
readonly embedConfig?: DefaultEmbedConfig & Record<string, unknown>;

embedDefinitions

readonly

The embed definitions to use for this shape util.

readonly embedDefinitions: readonly TLEmbedDefinition[];

Methods

getCustomDisplayValues

Parameters

NameDescription

editor

Editor;

shape

Shape;

theme

TLTheme;

colorMode

"dark" | "light";

Returns

Partial<DisplayValues>;

getDefaultDisplayValues

Parameters

NameDescription

editor

Editor;

shape

Shape;

theme

TLTheme;

colorMode

"dark" | "light";

Returns

DisplayValues;

Prev
EmbedDefinition
Next
EmbedShapeUtilDisplayValues