/usr/lib/python2.7/dist-packages/zope/html/widget.txt is in python-zope.html 2.2.0-0ubuntu11.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | ==============================
(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
The "fckVersion" attribute holds the version of CKEditor library.
>>> ckwidget.fckVersion
'3.2.1'
>>> print ckwidget()
<textarea...></textarea>
<script...
...height: 200...
...customConfig : "/myconfig.js"...
</script>
<BLANKLINE>
|