From 691ae85e50cabe869fe68166541a8f9aa64f9258 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 11 Sep 2020 16:33:26 +0200 Subject: [PATCH] TextFormatterPreview: Add documentation --- js/src/forum/components/TextFormatterPreview.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/src/forum/components/TextFormatterPreview.js b/js/src/forum/components/TextFormatterPreview.js index 203c04b0f..7853bd318 100644 --- a/js/src/forum/components/TextFormatterPreview.js +++ b/js/src/forum/components/TextFormatterPreview.js @@ -2,6 +2,16 @@ import Component from '../../common/Component'; +/** + * The `TextFormatterPreview` component renders Markdown as HTML using the + * TextFormatter library, polling a data source for changes every 50ms. This is + * done to prevent expensive redraws on e.g. every single keystroke, while + * still retaining the perception of live updates for the user. + * + * ### Attrs + * + * - `content` A callback that retrieves the latest content that should be rendered. + */ export default class TextFormatterPreview extends Component { view() { return
;