Over Text expression


#1

Hi!

I want… If the number exceeds the specified number, it is expressed as “…”.

ex) expression “show me”.
Text MaxLength=“3” , then…
-> “sho…”

Is there no way?


#2

Hi!

On Android and iOS export you’ll get “…” after your text if it is too long for the Text control. You won’t get the same result on local (desktop) preview however, but this works as expected on device.

If you however want to control this yourself, you’ll have to do it in JavaScript. It should be quite easy though. Something like:

(untested code ahead :))

var Observable = require("FuseJS/Observable");

var maxTextLength = 3;
var text = Observable("hello");
var textWithEllipses = text.map(function(x){
	if (x.length > maxTextLength) {
		return x.substring(0, maxTextLength) + "...";
	} else {
		return x;
	}
});

please let me know if this works for you


#3

Thanks!