Editors

Configuring TinyMCEWrapper

hearty fare

TinyMCEWrapper in TVs

When you only want some textarea TVs to use the Rich Text Editor

Zuriel asked...

You said you can turn on or off the MCE Wrapper for any Template variable? Is it possible to turn them off for All TVs by default and then turn them on for specific TVs.

How would I accomplish that assuming the TVs that I want on are called "Questions" and "Answers"?

The Solution:

donshakespeare says...

I looked closely, and the textarea IDs in the HTML source code are indeed the Template Variable MODx IDs. So, no need to write any plugin. SWEET! Just do:

    tinymce.init({
      mode : "exact",
      selector : "#tv12.modx-richtext, #tv13.modx-richtext",
      //where 12 and 13 are the IDs of your Question TV and Answer TV
      ...})
  

What's the Story?

TinyMCEWrapper uses a number of chunks to provide a really amazing amount of configuration options for TinyMCE itself. In this case, simply editing the TinymceWrapperTVs chunk to add the above configuration will let you have the TVs you want to use the Rich Text editor when the default setting is to not use it for textarea TVs.