June 7, 2021 at 11:49 pm
#6481

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