0

I would like to know if there is a way to format the text of a a text field in firestore with a word break using the firebase console. I would like for example to have result for example (text into 2 different lines or part of different paragraphs)

The sun shine on us.

This is a good news

Whatever text I add in firebase console, seem to default to a simple linear string (output is as follow)

The sun shine on us. This is a good news

I am able to achieve this result by adding formatted text from my app to firestore hoever I would like to do it the same using the firebase console. Thanks

M4trix Dev
  • 1,828
  • 3
  • 23
  • 48

1 Answers1

1

Considering the answer provided by a developer from Firebase in this Github issue here, it seems that Firebase indeed, silently strips newlines (both on input and on output). For this reason, even using \n, for example, wouldn't work for you, as it doesn't support new lines or this kind of formatting.

I searched around and it seems that this is not reported, so feel free to report it in the Firebase Issue Tracker. So, for now, unfortunately, the only option seems to be using SDKs, as you are using in your application, to add data in a formatted way.

gso_gabriel
  • 4,199
  • 1
  • 10
  • 22
  • Firestore doesn't strip anything. All text is preserved. The console just collapses whitespace for readability (realistically, how you would render 1000 lines of text in the console? – Doug Stevenson Oct 20 '20 at 15:51
  • Thanks gso_gabriel. It looks like you are right. There is no way to input line breaks from the firbase console – M4trix Dev Oct 20 '20 at 21:18