[fx][js] Move 3 functions from panel_tf to textformatter