#field

3 messages · Page 1 of 1 (latest)

simple path
#

how to store a html field? multiline string with new lines etc

proper dawnBOT
#

Hi @simple path. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

To store a HTML field or multiline string with new lines in Convex, you can use the v.string() method when defining your table. This method is used to define a string field in a table. Here's an example:

blocks: defineTable({
  htmlContent: v.string(),
  // other fields...
})

In this example, htmlContent is a field that can store a HTML string. You can store multiline strings with new lines in this field.

Please note that this is a general approach and you might need to adjust it according to your specific needs and the structure of your application.

For more information, you can refer to the Convex documentation (https://docs.convex.dev/dashboard/deployments/data#editing-a-document).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: