Javascript – How to convert an array of text segments into DOM tree object?
Let's edit a text block in Figma as shown in the image: Figma Plugin API gives the following segments for this text block: const segments = [ { "characters": "Lorem ", "fontWeight": 400, "listOptions": { "type": "NONE" }, "indentation": 0,…