Plone 4.3 + - Dexterity RichText field widget?

I tried developing a Dexterity type TTW with two RichText fields (plus a RelationChoice).

I thought the RichText fields by default would have TinyMCE enabled, but apparently there's something wrong: The Dexterity schema editor & regular Plone UI show just a textarea with "edit without visual editor" link at the bottom.

Enabling the RichText behavior populates the type with a RichText field just fine, but since I need two, that's not an option.

Given the behavior shows TinyMCE just fine and regular (upgraded) pages' RichText fields use the upgraded TinyMCE, I cannot understand why the custom RichText field does not. I guess there's some configuration missing, but where?

A 1.9.1 changelog entry (by @seanupton) says it's possible to use Rich Text w/TinyMCE 4 in Dexterity types other than How? What's required for that?

My Plone site is 4.3.12 with some upgrades:

  • = 1.3.0
  • = 1.0.1
  • = 1.9.1
  • = 1.1.1
  • z3c.form = 3.2.1

Post your XML?

Could be a JS issue... is there an error in your browser console?

I saw some requirejs-related errors, yes. But those were there also when TinyMCE was working ok. I am trying to find time to investigate this in more detail with a fresh instance to make absolutely sure the live site is not causing this in some way.

@petri Maybe this page will help you:

The idea is that "cheats" and hardcodes that richtext widget, so you need to register the adapter.

You could also take a look at the eea/eea.climateadapt package, is using the same combination: Plone 4.3, dexterity, In our case, we've released a custom egg of, to benefit from an updated Mockup.

1 Like

Thanks @tiberiuichim ! But the link does not work :frowning: I tried to find the blog on the site but could not...? UPDATE: Duh, it works with everything but Safari on OSX... weird.

Apologies for the lateness of my reply, but I have not tried this using TTW. You need to use, IIRC. To do that on an interface that is written in Python looks like this:

from import RichTextFieldWidget  # req >= 1.9.1+

class IMyContent(model.Schema):

    foo = RichText()

    bar = RichText()

I am not sure how do do this in TTW plone.schemaeditor (1.4.1), as I have not tried assigning widgets using schema editor (though I think you might have to edit this in the supermodel XML of the type's schema using a dotted name to the widget).



...which should look like this if you want the XML equivalent to edit TTW:

>>> from import RichTextFieldWidget
>>> from plone.autoform import directives
>>> from plone.supermodel import model, serializeSchema
>>> from import RichText
>>> class IMyThing(model.Schema):
...    directives.widget(foo=RichTextFieldWidget)
...    foo = RichText()
>>> xml = serializeSchema(IMyThing)
>>> print xml
<model xmlns:i18n="" xmlns:security="" xmlns:marshal="" xmlns:form="" xmlns="">
    <field name="foo" type="">
      <form:widget type=""/>
1 Like

Same problem here. What software are you using for that site, @tiberiuichim ?

Nothing fancy, nginx serving static files. I'll look into this, must be some misconfiguration somewhere.

This is google's cache, for the time being:

Thx - the site works fine with Chrome.