View Source CFSync.RichText (CFSync v0.17.1)
RichText recursive struct
RichText in Contentful is implemented as a tree of nodes. All nodes share a common structure and some of them have specific properties. Here I chosed to represent all nodes with a single struct for simplicity.
Link to this section Summary
Functions
Maps nodes recursively using the provided function.
Link to this section Types
@type marks() ::
:bold
| :italic
| :underline
| :code
| :superscript
| :subscript
| :strikethrough
@type node_types() ::
:document
| :paragraph
| :heading_1
| :heading_2
| :heading_3
| :heading_4
| :heading_5
| :heading_6
| :ol_list
| :ul_list
| :list_item
| :hr
| :quote
| :embedded_entry
| :embedded_asset
| :table
| :table_row
| :table_cell
| :table_header_cell
| :hyperlink
| :entry_hyperlink
| :asset_hyperlink
| :embedded_entry_inline
| :text
@type t() :: %CFSync.RichText{ colspan: integer(), content: [t()], marks: [marks()], rowspan: integer(), target: nil | CFSync.Link.t(), type: node_types(), uri: nil | binary(), value: binary() }
Link to this section Functions
Maps nodes recursively using the provided function.
The provided function should accept a node and return a new node.
@spec new(:empty | map(), CFSync.store(), atom()) :: t()