Markdown¶
The Markdown component is a simple way to display formatted text in your dashboard. It is useful to display information about the data or the visualizations in your application using the Markdown syntax.
Example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
This will render the following Markdown content:
Settings¶
The Markdown component has the following settings:
content
: The Markdown content to display. It must be a string using the Markdown syntax.editor
: A boolean value that indicates if the Markdown component is in editor mode. When set totrue
, the user can edit the content by double-clicking on the component. The default value istrue
.
Api Methods¶
The Markdown component exposes an API that you can use for additional functionality.
1 2 3 |
|
updateContent(content)¶
Replaces the content of the Markdown chart with the new content. This triggers the text-change
event.
addContent(content)¶
Adds the new content in addition to the existing content of the Markdown component. This triggers the text-change
event.
turnToEditor()¶
Turns the Markdown component into an editor, allowing the user to edit the content. This triggers the text:editor
event.
turnToMarkdown()¶
Turns the Markdown component into a Markdown viewer, displaying the content in Markdown format. This triggers the text:editor
event.
disableEditor()¶
Disables the editor mode of the Markdown component. This means the user cannot edit the content using the double-click event to turn the component into an editor.
enableEditor()¶
Enables the editor mode of the Markdown component. This means the user can edit the content using the double-click event to turn the component into an editor.