Store Content as Markdown
Hi there,
I liked the article about storing Notes as Markdown. Is it possible to incorporate this type into other data fields? I can't see an option to use the Markdown Widget in studio? It is also not an option in the Generic Widget. I am running the trial of version 5.9.3.
Thanks, Lynn
Hi,
This widget is not (yet? ;-)) exposed in Studio, but you can still use it. Here are the requirements:
- Two fields are needed in the schema:
- One (String) to store the content
- and another (String) to store the mime-type (html, markdown, …)
- Using a “Generic” widget and forcing the name to
richtext_with_mimetype
So, say you have the MyDocType
document, with a schema prefix mdt
and two fields, details
and details_mimetype
. In your layout, drop a “Generic” widget and:
- Click “Add field”, enter
met:details
(the list of fields is ordered, first one must be the storage field) - Click “add field” again and enter
met:details_mimetype
- As “Widget type”, enter
richtext_with_mimetype
- (save. Of course :-))
I owe a big thanks to Anahide who helped me a lot on this answer :-)