getTextSize

calculates the text size in an HTML node and returns the result

object getTextSize(string|array text,string css);
textstring|arraythe text of the HTML node
cssstringthe css style applied to the text
objectan object with the text width and height

Example

var text_size = webix.html.getTextSize("text", "css");

Related samples

Details

You can pass an array of strings as the first parameter. In this case the method will return an object with the maximal width and height values.

Back to top