Skip to main content

Python-mardown extension for inputs(text, select, checkbox...) in markdown document

Project description

md_inputs

md_inputs is a python-mardown extension for inputs(text, select, checkbox...) in markdown document

Usage

Use [[ text ]] to make a inline input element.

Text must contion attribute: type at least, like a html tag, your can add any attribute into the input element.

The value attribute is used to set the checkbox radio select input type value(selected or checked in given index(start from 0 for selected), "1" means checked)

If the type is select, the opt and opt_value attribute is used to set select options. opt means the display text of selections, each item use : to seperate. opt_value is the value of options, the separated item count of the opt_value must be the same of the opt. if the opt_value has not given, md_inputs will use the opt instead the opt_value.

Example

select

markdown:

[[type='select' opt='eopt1:eopt2' class='dfaj' id='eid1']]

html:

<p><span><select class='dfaj' id='eid1' ><option value='eopt1'>eopt1</option><option value='eopt1'>eopt2</option></select></span></p>

markdown:

[[type='select' opt='eopt1:eopt2' opt_value="1:2" class='dfaj' id='eid1' value="1"]]

html:

<p><span><select class='dfaj' id='eid1' value='1' ><option value='1' >eopt1</option><option value='2' selected>eopt2</option></select></span></p>

input

markdown:

[[type='input' value="hello" id='edit1']]

html:

<p><span><input type='input' value='hello' id='edit1' /></span></p>

checkbox

markdown:

[[type='checkbox' value="1"]]

html:

<p><span><input type='checkbox' value='1' checked /></span></p>

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

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

Source Distribution

md_inputs-1.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

md_inputs-1.1-py3-none-any.whl (2.9 kB view hashes)

Uploaded 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