Reply To: Issue Creating and Updating Text Views through Data Interactive API

#6481
Bill Finzer
Keymaster

Hi Jason,

Unfortunately the text API expects an object rather than simply a string. (Probably we should extend it to simply deal nicely with a string, too.)

Here’s an example of a simple (sic) such object:

{
 "object": "value",
 "document": {
  "children": [
   {
    "type": "paragraph",
    "children": [
     {
      "text": This is where selected </span>${<span style="font-style: italic;">pluralize</span>(<span style="color: #000080; font-weight: bold;">this</span>.<span style="color: #660e7a; font-weight: bold;">targetAttributeName</span>)}<span style="color: #008000; font-weight: bold;"> appear.
     }
    ]
   }
  ],
  "objTypes": {
   "paragraph": "block"
  }
 }
}

You can discern the object format at this Storybook site. I hope that helps.

Bill