GtBridge.Phlow.Text (gt_bridge v0.19.2)

Copy Markdown View Source

A Phlow text editor view specification.

Text views display textual content in GT's inspector.

Summary

Functions

Convert the text view to a dictionary format for serialization to GT.

I mark the text as markdown. GT renders with LeTextSnippet.

Set the text content to display.

Set the title of the view.

Types

t()

@type t() :: %GtBridge.Phlow.Text{
  markdown: boolean(),
  text_string: String.t(),
  view_priority: integer(),
  view_title: String.t()
}

Functions

as_dict(self)

@spec as_dict(t()) :: map()

Convert the text view to a dictionary format for serialization to GT.

markdown(self)

@spec markdown(t()) :: t()

I mark the text as markdown. GT renders with LeTextSnippet.

priority(self, priority_value)

@spec priority(t(), integer()) :: t()

string(self, text)

@spec string(t(), String.t() | (-> String.t())) :: t()

Set the text content to display.

title(self, title_text)

@spec title(t(), String.t()) :: t()

Set the title of the view.