visca_c
September 25, 2021, 12:29am
1
I want to allow user to be able to bold text in the TMP inputfield. So I tried with the following code to position the caret inside the tag. But I noticed manipulating caretPosition will skip tags, how can I put the caret inside?
string tag = "<b></b>";
inputField.text = inputField.text.Insert(caretPosition, tag);
inputField.caretPosition += 3;
visca_c
September 25, 2021, 7:52am
2
I learned from this thread about the inner cared, which is named stringPosition
Hi everyone,
First of all, let me say that text mesh pro is a great asset, it makes working with text in unity a lot simpler and easier. Having said that we have encountered some issues with input fields and we were wondering is there a way to overcome them.
Issue #1: Inner caret position (string position) of input field is positioned after all tags
InputField, in which RichTextEditing is disabled, positions caret in string after all tags which causes entered
text to be of the following sā¦
2 Likes
awsapps
January 17, 2023, 11:23am
3
Thank you very much! I spent like 2 hours for this, thank you !!