Action just for content with rich text [SOLVED]

Is it possible to register an action just for content that has rich text (behaviour) ?

Can't you add that as a python-expression condition on the object/context?

You can check for interfaces with a helper view in a python expression like this:

python: context.restrictedTraverse('@@plone_interface_info').provides('project.content.ct.IMyCTInterface')

Maybe the @@plone_interface_info view could/should be extended to support short hand behavior names. But I'm not sure how that works with the rewrite of behavior identifiers from last year where has become plone.richtext.

As @fredvd says :wink:

This seems to work in Plone 5.2.1


You have to use the interface's dotted name, not the shortname plone.richtext


Super… thanks everyone.

I registered the 'view' of the action


And put the condition on the Action:


So now the action can not be called by url, and it is just present in the toolbar for rich text content