Skip to main content

Plugin for safe text editing with MKDocs.

Project description

Build Status PyPI version Codecov BSD License Requirements Status

Plugin for safe text editing with MKDocs.

Table of Contents

How does this plugin work?

Markdown is a very flexible format, and raw HTML is allowed. But it is unnecessary in multiple-person text editing.

When raw HTML like <font> tag is used in MKDocs, it is rendered as it is.

No escaped font

If you use this plug-in with MKDocs, tags that are not allowed in the whitelist are escaped.

Escaped font

Installation

Install it via PyPI using pip command.

$ pip install mkdocs-safe-text-plugin

And add it to your mkdocs.yml file.

plugins:
  - mkdocs_safe_text

An example of use can be checked by example/basic-usage.

Plugin configuration

This plugin works with the HTML tag element for Markdown defined by bleach-whitelist enabled. This implementation approach is recommended in the Python-Markdown release notes.

And user can change this setting.

plugins:
  - mkdocs_safe_text:
      append_allowed_tags:
        - tag1
        - tag2
      remove_allowed_tags:
        - tag3
        - tag4
      allowed_attrs:
        tag5:
          - attribute1
          - attribute2

An example of use can be checked by example/customization-usage.

License

BSD 2-Clause License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-safe-text-plugin-0.5.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

mkdocs_safe_text_plugin-0.5.0-py2.py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page