-
Notifications
You must be signed in to change notification settings - Fork 45
App Markdown support
The Beiwe Android app supports Markdown formatting in two places:
-
The text of a survey question, but not the answer choices (for radio button and checkbox questions). If a researcher wants a survey to contain a long page of formatted informational text, the researcher can include an Informational Text question in the survey, and format that question's question text using Markdown.
-
The voice recording prompt for an audio survey. However, voice recording prompts are currently limited to a single line. We can change them to support multi-line prompts; this should be very easy.
-
The body of a message. (The messaging feature is coming soon!)
The Android app doesn't currently (as of November 2021) support Markdown formatting in other places that have customizable text (for example, the app's About Page or Consent Form). It should be pretty easy to add Markdown formatting support to these other places as well, since we've already written the Android code necessary for this to work on survey questions.
The Beiwe iOS app does not currently (as of November 2021) support Markdown. If a researcher creates Markdown-formatted questions in the survey builder for a study that has both Android and iOS participants, the Android participants will see formatted text, while the iOS participants will probably see the raw text, i.e., the characters like #
, _
, **
, etc. that Markdown uses to denote formatting.
The Android app uses the AndDown library. Based on our testing, the Android app does NOT support all formatting options in the Markdown spec; specifically, it does not support numbered lists, nested lists, tables, and horizontal lines. We don't know why it doesn't support those; we haven't looked into it. This is the subset of format options that the Android app supports:
# H1
## H2
### H3
#### H4
##### H5
###### H6
_italic_ or *italic*
__bold__ or **bold**
**_both bold and italic_**
> Everything on the line beginning with this caret is indented as a block quote, even if it's a really long line and it wraps around.
You can create bullet lists. Each list item must be preceded by the bullet character
(Unicode U+2022, which you can copy-paste from Microsoft Word's bullet lists) and
then a space. Each item must also be followed by a double newline:
• Item one
• Item two
• Item three
You should always put two new lines between separate paragraphs.
This is paragraph 2.
This is paragraph 3.
This will show as part of paragraph 3.
[This is the text of the link that's displayed](https://www.example.com)