I spent the whole day reviewing those past forum messages. The originator of the idea was creating resources in MODx CMS Manager, which are stored in the database, not to files. Others were talking about crating files. Some were mixing the two. It was all very confusing, but turned out to be simple:
In System Configuration, Interface and Features, TinyMCE needs to have “template” added to Custom Plugins and Buttons.
In the TinyMCE plugin custom parameters field ( Manage Elements / Plugins: under configuration tab for TinyMCE Rich Text Editor plugin) add:
CODE:
template_external_list_url:
http://gsyha.org/assets/templates/templates.js
(It’s important to use this absolute path, or at least it was for me.)
Create a new js file "templates.js". Enter:
CODE:
// JavaScript Document
var tinyMCETemplateList = new Array(
// Name, URL
["Scrolling Credits", "/templates/credits.html"],
["Test", "/templates/test.html"]
);
These relative paths work because the /templates folder is under /assets, which is the base path.
Credits.html and test.html are the two template files. Credits.html contains “{{credits}}” as it’s only content, which gets inserted into the document being edited by TinyMCE.
It didn’t seem necessary to me to have a script call a chunk when I could just add {{chunk_name}} in the html file.