==============================
(X)HTML fragment editor widget
==============================

The widget included in this package is a simple application of the
FCKeditor control.  It is only expected to work for fragments, not for
arbitrary documents.  Let's create a field and a widget::

  >>> from zope.html import field
  >>> from zope.html import widget
  >>> from zope.publisher import browser

  >>> class Context(object):
  ...     sample = u""

  >>> myfield = field.XhtmlFragment(
  ...     __name__="sample",
  ...     title=u"Sample Field",
  ...     ).bind(Context())

  >>> request = browser.TestRequest()
  >>> mywidget = widget.FckeditorWidget(myfield, request)
  >>> mywidget.setPrefix("form")

  >>> mywidget.configurationPath = "/myconfig.js"
  >>> mywidget.editorWidth = 360
  >>> mywidget.editorHeight = 200
  >>> mywidget.toolbarConfiguration = "mytoolbars"

  >>> print mywidget()
  <textarea...></textarea>
  <script...
  "form.sample", 360, 200, "mytoolbars");
  ...Config["CustomConfigurationsPath"] = "/myconfig.js";
  ...
  </script>
  <BLANKLINE>

We should also test the CkeditorWidget.

  >>> ckwidget = widget.CkeditorWidget(myfield, request)
  >>> ckwidget.configurationPath = "/myconfig.js"
  >>> ckwidget.editorHeight = 200

  >>> print ckwidget()
  <textarea...></textarea>
  <script...
  ...height: 200...
  ...customConfig : "/myconfig.js"...
  </script>
  <BLANKLINE>
