.. _writing_rich_text: Writing Rich Text Entries ========================= LabArchives rich-text entries use HTML for formatting. The examples below show common markup patterns you can pass to :class:`~labapi.entry.entries.text.TextEntry`. 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`` tags for basic paragraphs: .. code-block:: html
This is a paragraph.
This is another paragraph.
Text Formatting ~~~~~~~~~~~~~~~ Use standard HTML tags for common inline formatting: - Bold: ``bold text`` - Italic: ``italic text`` - Underline: ``underlined text`` - Strikethrough: ``
This paragraph contains bold,
italic,
underlined,
and strikethrough text.
This text is red.
This text is blue.
Tables ~~~~~~ Create tables with ``| ``, and `` | ``:
.. code-block:: html
|
|---|