I want users of my solution to be able to write comments about uploaded documents. I noticed that there are a bunch of different ways to format text in Appway. Looking through the Screen editor, I can see at least four different options I could use. Which would you recommend?
You correctly identified the four options Appway offers:
- Allow users to write comments in Markdown
- Allow users to write comments in BBCode
- Use the Text Editor [CK] component, and allow users to format text directly
- Use a regular text field, and not allow users to format text at all
Let's look at each, starting with the last—and most simple—option you mention.
For something like adding comments to a document, this might be the best solution. A plain text field is easy to understand and use: People just type text into a field, and it is rendered exactly as they typed it. It's also secure; if people try to enter HTML code, for example, Appway's text component escapes that HTML by default, preventing security problems like cross-site scripting attacks.
BBCode is a formatting language invented back in 1998, at the dawn of the Internet era. Its purpose was to allow people to add simple formatting to comments in a secure fashion. Given that it was designed back in 1998, it was aimed at a very technical audience. As a result, it leans heavily on HTML for its syntax, and is pretty difficult to learn and use. It's also quite anaemic, lacking full support for things like headers, so it's not suitable for writing longer documents.
In short, if you have a technical audience that knows HTML, and you want to allow them to add some simple formatting to comments, BBCode is a relatively secure way of achieving this.
Note: To render BBCode as HTML, use the BBCode Function.
Markdown is a simple, structured language for writing text that can be converted to HTML. Its design goal was to create a language that is easy to write, yet powerful enough to create complex structured documents. As such, it is much easier to write than BBCode, but less secure. It assumes that the person writing the Markdown code is trusted. While there are secure versions of Markdown, Appway does not support them.
If you have trusted people creating structured documents, Markdown is the best way to go.
Note: To render Markdown as HTML, use the Markdown Function.
I think it's worth quickly comparing the two languages' syntax, to further illustrate the different approaches the two languages take. Markdown aims to be easy to write, and also easily readable even when not rendered to HTML; BBCode is technical, and based on HTML.

Appway's built-in rich text editor provides a very user-friendly, extremely powerful way of creating richly formatted text. Since it relies on HTML as its output format, it is completely insecure, and should not be provided to untrusted users. Also, given that it basically provides access to all features of HTML, there is no way to control what kind of content people create using this component, so it is not suitable for creating structured documents.
If you're still unsure which option to pick, this decision tree might help.
