[Grok-dev] How to pass options to TinyWidget with megrok.form?

Andreas Knop a_knop at web.de
Thu Jun 19 10:00:04 EDT 2008


Hello,

I wanted to use some form with a tinyMCE Widget.  Therefor I did install 'megrok.form'. Now I try to pass options to MCE . 
I Did something like that:


import grok
from zope.schema import TextLine, Text
from zope.formlib import form
from megrok.form.fields import HTML

class MyHTMLWidget(HTML):
mce_language = 'de'
mce_theme_advanced_disable = 'bold,italic'
mce_cleanup = 'false'
mce_entity_encoding="raw"

class Sample(grok.Application, grok.Container):
			myText="<h1>Beispieltext</h1>"

class Index(grok.DisplayForm):
      form_fields = grok.Fields(myText=MyHTML(title=u"Inhalt"))

class Edit(grok.EditForm):
			grok.name=('sampleEdit')
			form_fields = grok.Fields(myText=MyHTML(title=u"Inhalt"))


But this doesn't work.
Anybody knows howto manage it?

Regards Andreas
______________________________________________________________
Jeden Monat 1 hochkarätiger maxdome-Blockbuster GRATIS!
Exklusiv für alle WEB.DE Nutzer. http://www.blockbuster.web.de



More information about the Grok-dev mailing list