CDRH / african_poetics

Orchid / Rails site for Contemporary African Poets part of African Poetics site
0 stars 0 forks source link

Investigate ingesting rich text/text with line returns #279

Closed karindalziel closed 1 year ago

karindalziel commented 1 year ago

The "Bio" field on the contemporary poets table has line returns that should be represented in the interface.

If this text comes out of the API with newlines intact, we could try to preserve newlines and display the text as preformatted text on the page to preserve the line returns

Perhaps a better idea is to convert the field to a "Rich text" field. It appears when a field is rich text, the API returns the text as markdown, which can then be converted to HTML. I believe we can put the HTML into Elasticsearch as is and display from there.

I have done a test Airtable base where I changed the bio field to "Rich text" and it appears everything came through ok (https://airtable.com/appKJKA9gf7GeIMbn/tblXUNDXG5ncNLEXJ/viw5hKpcGb0RDhNXa?blocks=hide), though I wonder what the indented text will come out as.

wkdewey commented 1 year ago

I can get Rails to parse the text with newlines. Will test out the html transformation later.