How to activate Redactor only for specific children?

Hi,

I want to activate Redactor editor only on the [[*content]] area but only of specifics children.
Elsewhere, I doesn’t want wysiwyg editor at all.
What is the way to do this ?

Thanks !

Hedy

Hi Hedy,

On the settings tab of a resource you can enable/disable rich text for that specific resource. That doesn’t automatically inherit through to child resources, so you’ll need to set it for each resource individually, but that might be something a plugin or batch process could be used for.

Hummm too bad :frowning:
I will try to get an plugin to do this automatically

Hedy,

For your plugin you may want to look at the getParentIds method.

I think it will get you half way there. It will give you an array of ancestor IDs that you can use to “crawl up the resource tree” checking the RichText setting of each.

Thanks for the tips jpdevries.
Finally, I have found another solution :

  1. Activate RTE globaly on MODX settings
  2. With Batch extra, disable RTE on all document which they don’t need RTE
  3. Install Collections extra and activate it for the blog area.
  4. Setting the Collection View to activate RTE (Redactor) for all children of this Collection (all articles on the blog)

For now it’s look good :slight_smile:

1 Like

Hedy,

Glad to hear it. If you ever run into an issue of needing the deactivation to be ‘dynamic’ so that whenever they create a new resource under a certain parent it is also deactivated I would think the plugin trick would work.