Skip to content

API reference / Common / Engine types / Markup

Type Alias: Markup ​

ts
type Markup = 
  | {
  contentControl: ContentControl;
}
  | {
  customXml: CustomXml;
}
  | {
  smartTag: SmartTag;
};

One wrapper of the markup family, whichever kind it is.

The model never holds this — a node holds the concrete payload, and the node is also what says the level. Two places do:

  • the co-editing payload map, keyed by id, which is all that says which kind an id names: the mark key is only markup:block or markup:span, so nothing in the character stream distinguishes a control from a smart tag;
  • an edit intent (WrapBlocks / WrapSpans), which names the wrapper to create before any node exists to hold it.

Because one map is keyed by the raw id, ids are unique across the three kinds — they are minted from the one session IdGenerator, so this costs nothing to hold.