Designer API: Text block element does not give `textContent` property

I am trying to explore the Designer API to create an extension app.

My problem is basically, when I select a Text block element, it doesn’t give a textContent property, and setTextContent is also not possible. While this works on Headings and Paragraphs, it doesn’t work on a plain Text block. I am thinking possibly due to a Text block being a plain div.

Do you have any alternatives for this? Thanks

Hey @micoirvin! Welcome to the forum!

It may be that the element has the textContent in a child. This can be the case for some legacy elements from some templates.

You could try do a call if it has children then do something like:

text = el.getChildren
textChild = text[0].setTextContent()