# Text Formatting

**URL:** https://discuss.elastic.co/t/text-formatting/234034
**Category:** Kibana
**Created:** [May 24, 2020, 8:56am UTC](https://discuss.elastic.co/t/text-formatting/234034 "2020-05-24T08:56:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nav12](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@Nav12](https://discuss.elastic.co/u/Nav12)
#### Post date: [May 24, 2020, 8:56am UTC](https://discuss.elastic.co/t/text-formatting/234034/1 "2020-05-24T08:56:44Z")

</div>

Hi,

This is probably not a Kibana issue (great start!)....or atleast the answer doesn't lie in Kibana....i dont know.

When I search for my data sitting in elasticsearch using the Console in Kibana - there is a text field that I have which contains ... well lots of text.

In Kibana when I run my GET - that text field returns nicely formatted with all the Carriage Returns/Line feeds and looks fine.

When I try and return that same data via a site (javascript, etc...) - the whole formatting goes and it is just one clump of text.  
(see probably not a kibana question...).

I am just struggling to understand why I cannot return that field exactly as it shows in ES.

If there is some advice - I would appreciate it.

Many Thanks,

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [May 24, 2020, 1:58pm UTC](https://discuss.elastic.co/t/text-formatting/234034/2 "2020-05-24T13:58:22Z")

</div>

If you're calling the Elasticsearch API to search for documents and a field contains newlines/carriage returns and you show it in a HTML page, you will need to convert the newlines into `<br>` tags or show the result within `<pre>` tag.

---

<div class="post-metadata">

### Author: ![Nav12](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@Nav12](https://discuss.elastic.co/u/Nav12)
#### Post date: [May 24, 2020, 3:24pm UTC](https://discuss.elastic.co/t/text-formatting/234034/3 "2020-05-24T15:24:38Z")

</div>

Thank you Luca - that is what I needed. I am sure that sounded like a basic question now....

Thanks so much.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 21, 2020, 3:24pm UTC](https://discuss.elastic.co/t/text-formatting/234034/4 "2020-06-21T15:24:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
