uccser/verto

View on GitHub
docs/source/processors/boxed-text.rst

Summary

Maintainability
Test Coverage
.. _boxed-text:

Boxed Text
#######################################

**Processor name:** ``boxed-text``

You can enclose text inside of a box using the following text tag:

.. literalinclude:: ../../../verto/tests/assets/boxed-text/doc_example_basic_usage.md
   :language: none

Optional Tag Parameters
***************************************

- ``indented`` - If ``yes``, the box will have indentation on the left to match indentation of the first level of a list.

The default HTML for button links is:

.. literalinclude:: ../../../verto/html-templates/boxed-text.html
   :language: css+jinja

Using the example tag above, the resulting HTML would be:

.. literalinclude:: ../../../verto/tests/assets/boxed-text/doc_example_basic_usage_expected.html
   :language: html

Overriding HTML for Boxed Text
***************************************

When overriding the HTML for boxed text, the following Jinja2 placeholders are available:

- ``{{ text }}`` - The text enclosed by the boxed text tags.
- ``indented`` - Set to ``yes`` if the indentation parameter was set to ``True``.

**Example**

For example, providing the following HTML:

.. literalinclude:: ../../../verto/tests/assets/boxed-text/doc_example_override_html_template.html
   :language: css+jinja

with the following tag:

.. literalinclude:: ../../../verto/tests/assets/boxed-text/doc_example_override_html.md
   :language: none

would result in:

.. literalinclude:: ../../../verto/tests/assets/boxed-text/doc_example_override_html_expected.html
   :language: html