How to paste rich text into notepad or markdown

I’m really excited about the new Notepad and Markdown widgets for displaying rich text. I have a Google Sheet which contains formatted text that I want to bring over, but when I paste into a text column in Grist the formatting disappears. Is there a way to paste rich text into Grist? I have thousands of entries to update, so ideally I would want to bulk paste the text, not paste one entry at a time.

No one? No way around this?
:slightly_frowning_face:

Hi Victor!

I apologize for the delay in responding. We somehow missed your initial post. Unfortunately, there is no good way to paste rich text into Grist. This is something we would like to improve in the future. In the meantime, if the entire column is formatted in the same way, you could use formulas to add the formatting to the text. I created an example at the link below:

https://public.getgrist.com/hqiX3ZYtmNS2/Community-939/m/fork

Copy/Paste the plain text into Grist (or import) then you can create a new formula column that adds formatting as a string. For example, to bold text in markdown, you surround the text with two asterisks, like you see in the screenshot below. Then, have the markdown widget point to this formula column to show the formatted text.

image

Again, I apologize for our delay in response! I hope this workaround helps. Please let me know if you have any other questions.

Thanks!

Thanks for the reply. Unfortunately that doesn’t help me, as I’m looking to reproduce text that has a mix of different formatting.

A workaround for this I went with is to:

  1. Create a table with at least 1 text column for the rich text field (e.g. I used “Notes” as I was porting from Asana which has Tasks with a Notes field in the CSV export which has at least some rich text features like line breaks).
  2. Create a page with that table as a widget on the page.
  3. Add a Custom Notepad widget to the page and assign it to the text column of the table.

Now, to import your data you have 2 options. Since I only had ~40 rows to import, I then:

  1. Copy the data from the rich text source you want to import from.
  2. Paste it into the Grist table. This causes the rich text formatting to be lost, but now, on the page you created, you can click a row of the table and see the data in the Notepad widget and manually re-add your formatting. Do this once for all your rows and you are now in business.

Alternatively, you can inspect the data that the Notepad widget creates when you write the data you want and write a script that generates that data (it’s JSON formatted). I didn’t decide to go that route, but it looks reasonable at least for the use cases I had of line breaks and bullet points.