rich_text

class virtualitics_sdk.elements.rich_text.RichText(content, border=False, title='', description='', show_title=True, show_description=True)

Bases: Element

A Rich Text Element.

Parameters:
  • content (str) – The value inside the rich text element

  • border (bool) – whether to surround the text with a border, defaults to False.

  • title (str) – The title of the element, defaults to ‘’.

  • description (str) – The element’s description, defaults to ‘’.

  • show_title (bool) – whether to show the title on the page when rendered, defaults to True.

  • show_description (bool) – whether to show the description to the page when rendered, defaults to True.

EXAMPLE:

# Imports 
from virtualitics_sdk.elements.rich_text import RichText
. . .
# Example usage
class ExampleStep(Step):
  def run(self, flow_metadata):
    . . . 
    new_rich_text_1 = RichText("""
         The usual [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
         does not cover some of the more advanced Markdown tricks, but here
         is one. You can combine verbatim HTML with your Markdown. 
         This is particularly useful for tables.
         Notice that with **empty separating lines** we can use Markdown inside HTML:

         <table>
         <tr>
         <th>Json 1</th>
         <th>Markdown</th>
         </tr>
         <tr>
         <td>
         <pre>
         "id": 1,
         "username": "joe",
         "email": "joe@example.com",
         "order_id": "3544fc0"
         </pre>
         </td>
         <td>


         "id": 5,
         "username": "mary",
         "email": "mary@example.com",
         "order_id": "f7177da"
         </td>
         </tr>
         </table>""", border=False)

The above RichText will be displayed as: