Skip to main content

When I use the miro rest api to create a text widget, the height is not set correctly:

 


However, editing the text as a user - such as entering edit mode, or selecting and then bolding, corrects it:

 



Using the miro sdk (not api) to update a text’s width, bold, or even just select it does not fix it either - only doing a user action

Any ideas of a possible fix?

Also of note: padding seems to break behaviour entirely, with inconsistent width and wrappings even between refreshes.

Hi cloutsocks, 

 

Thanks for bringing this up. We’ve seen similar comments around this in the past, but wanted to share a different thread with you that might shed some light on things: https://community.miro.com/developer-platform-and-apis-57/text-widget-width-attribute-multiple-occurances-5173
 

We’re looking into improvements we can make around this area, hopefully we can implement some soon!


I don’t think that’s related. Any amount of height, no matter how absurd, is not applied whatsoever. So it’s not a conversion issue or a restriction of line height.

 

Even leaving the height out produces the overhang effect, so it’s more likely a bug rather than an implementation detail, right?


(For what it’s worth, we ended up just using shapes to bypass the bug)


This is horrible.

Really needs to be fixed.


I need the text formatting.

 

The other shapes do not support the formatting that text provides.

They probably should, but  they don't.

Are there any workaround possible with the API to get the object to updated so it can be sized properly?


Ok, so if I drop a bunch of these objects on the board at once, they all appear in the same space so I use the framing tool to select them and spread them out a little. Then I select a large group and change them into shape and they do indeed keep the formatting, so I will try what you suggest and just insert them as shapes and then switch them to text afterwards….

 

Thanks for the tip @cloutsocks 


Doesn't work to convert the objects to text after loading them as shape.

 

When you switch them to text (and you are limited to do so 30 at a time), they have the same problem as shown in the first screenshot posted on this thread.

 

There's something special happening when a user clicks on a text object in terms of height sizing that doesn't occur with the API?

 

Why is this?  Is the API not being used for the main miro user interface?


Reply