1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

TextFormatterPreview: Add documentation

This commit is contained in:
Franz Liedke
2020-09-11 16:33:26 +02:00
parent fb83f8c59c
commit 691ae85e50

View File

@@ -2,6 +2,16 @@
import Component from '../../common/Component'; 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 { export default class TextFormatterPreview extends Component {
view() { view() {
return <div className="Post-preview" />; return <div className="Post-preview" />;