Add a session default for rich text, and reflect it in TextEditorView.

Review Request #6476 — Created Oct. 21, 2014 and submitted — Latest diff uploaded


Review Board


UserSession now has a 'defaultUseRichText' flag (currently hard-coded to
true) that indicates if text fields should always default to Markdown
when saving.

If set, TextEditorView will force any text field to be in Markdown mode
initially when open, even if the richText attribute passed to it is
false. This is to keep with the current behavior where plain text fields
(such as those filled in by rbt post) are set to save as Markdown for
any modifications.

(Of course, that only works if the plain text coming in is escaped for
Markdown, which is the responsibility of the caller. A comment above
this new code explains that assumption.)

If the default for the user is not to use Markdown, then the text field
will reflect the provided richText setting.

Unit tests pass.

Tested manually with different combinations of incoming richText values
and different user defaults.