I want to use Coda as a headless CMS. For that reason I need to get formatted data out of the fields present in a Coda document. For this, the “rich” formatting option for “valueFormat” in the API is just splendid - I get Markdown, which is exactly what I want.
However, the documentation states:
textvalues, returns data in Markdown syntax. If the text field is simple text (e.g. has no formatting), the field will be fully escaped with triple-ticks. E.g ```This is plain text```
The simple text part of this is really not really nice. Fully escaping the text with triple-backtics is not an escape in Markdown, it’s formatting! Triple backticks mean the same thing as a <pre> block in HTML. So every simple text field will be shown with a fixed with font. This is not something that is useful.
I believe the reason you do this is that you have special datatypes for “simple” fields and fields with formatting. For the simple fields you can’t simply return the contents as is, because otherwise they would be interpreted as Markdown by the recipient - so you need to escape the contents.
However, this means of escaping changes the meaning, and is not really transparent for consumers. Instead, I would suggest you use something like markdown-escape - npm (in your programming language of choice) to actually escape all the input in a way which does not change the meaning.