InputText and TextBlock work incorrectly with Unicode characters (Emoji, for example). Here is an example. Unfortunatelly, when I save the file, all emoji replaces with question marks… So, you should change line 28: the value should be " a:wink:b:smirk:c:kissing_heart:d:heart_eyes:e:innocent:f:money_mouth_face:g".
There are two problems:
- If you try to use backspace to delete some characters, Unicode characters will be broken.
- textWrapping (BABYLON.GUI.TextWrapping.Ellipsis) of the TextBlock cuts Unicode characters between bytes.
It’s a known limitation of the Playground that won’t save the source code in Unicode/Utf8.
Try in jsfiddle instead:
This sample also demonstrates the custom word splitting function you need to use if splitting at space boundaries does not work.
This post is not about the Playground. It’s about InputText and TextBlock.
- InputText removes only part of a Unicode character.
- TextBlock splits in a wrong way.
Isn’t it a bug?
My bad, didn’t fully understand the question (still, my answer explains your comment “When I save this file, all emoji replaces with question marks :(”).
There’s a problem indeed with characters using more than 16 bits for their representation… I think you can create an issue in the repo about this.