How to take the text from a rich text input field and save each line into an array

Hello, I need help with transferring the input from an input field into a script and saving each line of text separately in an array. I have tried to do this with the .Split function, but It only saves the first line, so I end up with one slot in the array containing just the first line of text. This is no use. Please help. :smiley:

Code :

public InputField inputField;
public string[] lines;

void Update () {
   lines = inputField.text.Split ("/n" [0]);

Don’t think rich text is supported for InputFields. Either way, try this:

lines = inputField.text.Split ('

Note the single quotes and backslash.