deform_markdown package

Submodules

deform_markdown.test_init module

class deform_markdown.test_init.TestMarkdownTextAreaWidget[source]

Bases: object

make_one(**kw)[source]
test_deserialize_emptystring(field)[source]
test_deserialize_no_strip(field)[source]
test_deserialize_null(field)[source]
test_deserialize_strip(field)[source]
test_serialize_autosave_default_option(field, monkeypatch)[source]
test_serialize_default_and_custom_options(field)[source]
test_serialize_none(field)[source]
test_serialize_not_null(field)[source]
test_serialize_null(field)[source]
test_serialize_readonly(field)[source]
deform_markdown.test_init.field(schema, renderer)[source]
deform_markdown.test_init.renderer()[source]
deform_markdown.test_init.schema()[source]
deform_markdown.test_init.test_add_default_resources()[source]

Module contents

class deform_markdown.MarkdownTextAreaWidget(**kw)[source]

Bases: deform.widget.TextAreaWidget

Renders a <textarea> widget with the simplemde markdown editor.

To use this widget the simple-markdown-editor library must be provided in the page where the widget is rendered. A version of it is included in the static directory.

default_options = (('height', 240), ('width', 0), ('forceSync', 'true'), ('indentWithTabs', 'false'), ('autosave', {'uniqueid': None, 'enabled': 'true'}))

Default options passed to simplemde.

options = None

Customize default options.

readonly_template = 'readonly/markdown'
requirements = (('simplemde', None),)
serialize(field, cstruct, **kw)[source]
strip = True
template = 'markdown'
deform_markdown.includeme(config)[source]

Pyramid integration: register static view for widget resources.