Store paragraphs with indentations in postgres with prisma ( such as for markdown )

Viewed 62

Problem

Recently, I made markdown text editor, and want to store markdown format to database. So I am wondering if it is possible to store paragraphs with indentations in postgres with prisma model. I tested when detail property has only string, and indentations of the paragraph weren't saved.

How can I save strings with multiple lines with prisma?

model

model Post {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  title     String   @db.VarChar(255)
  detail    String   //This part 
}

Prisma Studio

enter image description here

Browser

enter image description here

1 Answers
Related