@twinfinity/core
    Preparing search index...

    Class MarkupText

    Class representing a markup text in the markup API. WARNING: MarkupText does not sanitize any text passed to it, if you are using MarkupText in conjunction with Html2CanvasText make sure to use a sanitizer (for example DOMPurify).

    Hierarchy (View Summary)

    Implements

    Index

    Properties

    id: string
    normal: Vector3
    position: Vector3
    properties: Map<string, MarkupProperty> = ...
    rotation: number = 0
    scale: number | Vector3
    style: { backgroundColor: Color4 } = ...
    text: string

    Accessors

    • get isEnabled(): boolean

      Returns true if the entity and the sheet it belongs to are both enabled, otherwise false.

      Returns boolean

    • set isEnabled(b: boolean): void

      Sets if entity is enabled

      Parameters

      • b: boolean

      Returns void

    • get sheet(): MarkupSheet2D

      Returns the markup sheet that the entity is attached to

      Returns MarkupSheet2D

    Methods

    • Copies data of other markup text into current

      Parameters

      Returns void

    • Sets the entity as updated in the layer API.

      Returns boolean

      true if object did exist, otherwise false