Moya WYSIHTML5

Moya WYSIHTML5 (What You See Is HTML 5) is a wrapper for wysihtml5, an open source rich text edtor By Xing.

Installation

This is a built in library may be imported from its Python path, as follows:

<import py="moya.libs.wysihtml5" />

And installed as follows:

<install name="wysihtml5" lib="moya.wysihtml5" />

This library doesn't haven any views, and does not need to be mounted.

Usage

This library supplies a single widget, <editor> which may be used to replace a textarea in a form with a rich editor that supports bold / italic / links / image etc.

The easiest way to use this widget is to use it in a form as follows:

<field name="content" label="Page Content">
    <wysihtml5:editor/>
</field>

This will insert a rich text editor in your form, that writes HTML to a field named content. The field may be treated as any other when the form is validated, it will contain HTML markup when the form is submitted. Essentially, the above code is equivelent to the following when it comes to processing forms:

<textarea name="content" label="Page Content"/>

See <editor> for how to configure the editor.