.. _writing_rich_text: Writing Rich Text Entries ========================= The content of a :class:`~labapi.entry.entries.text.TextEntry` is HTML. Create a Rich Text Entry ------------------------ The examples below assume you already have a ``page`` object: .. code-block:: python from labapi import TextEntry page.entries.create(TextEntry, "

This is a rich text entry.

") For a broader HTML reference, see the `MDN HTML elements reference `_. Common HTML Patterns -------------------- Paragraphs ~~~~~~~~~~ .. code-block:: html

This is a paragraph.

This is another paragraph.

Text Formatting ~~~~~~~~~~~~~~~ .. code-block:: html

This paragraph contains bold, italic, underlined, and strikethrough text.

Text Color ~~~~~~~~~~ .. code-block:: html

This text is red.

This text is blue.

Tables ~~~~~~ .. code-block:: html
Header 1 Header 2
Row 1, Cell 1 Row 1, Cell 2
Row 2, Cell 1 Row 2, Cell 2
Lists ~~~~~ .. code-block:: html .. code-block:: html
  1. First item
  2. Second item
  3. Third item
Related Pages ------------- - :ref:`entries` for entry type behavior and update semantics. - :doc:`/examples/csv_table` for a complete CSV-to-HTML workflow. - :ref:`creating_pages` for creating a page before adding rich-text entries.