RE: Dave Smith
Thanks for the feedback.
I wonder if you have found the little plus sign the side of each property in the plugin? I have managed to cough out what my mind deemed coherent at the time of composition.
"activate..." turns on/off the code editor completely.
When "on" then you can
"use..." said editor here and there.
Things to note
on = code editor's CDN js file
can be loaded into the MODX Manager page by whatever calls or
"uses..." it.
Because of common sense, the CDN files do not load always.
The code editors are primarily for Resource full pages and Elements and Files.
useAceOrCodeMirrorEveryWhere
Experimental - Fires at OnManagerPageInit. Works Manager-wide. No need to be editing a MODX resource or element to load Ace or CodeMirror. You can be at the Dashboard or CMP to use Code Editor- comes in handy when doing Quick Update/Create outside of Resource and elements/files. This option respects useAceOrCodeMirrorOnResources and useAceOrCodeMirrorOnElementsFiles
If a resource/element does not load any code editor CDN,
useAceOrCodeMirrorEveryWhere will prove quite useless (even to Quick Edit). As described, useAceOrCodeMirrorEveryWhere will work outside Resources and Elements and Files.
New Resources in Collections
You did everything right.
The "experimental"
useAceOrCodeMirrorEveryWhere does not cover the rather rare way Collections creates new resources. They have no
$id = 0 parameter.
But this is non-issue, as this is covered already in my update.
Replace line ~670 of TW plugin
if (isset($_GET["a"],$_GET["id"]) && $_GET["id"] == 0 && strpos($_GET["a"], $newResource) !== false) {
with:
if (isset($_GET["a"]) && strpos($_GET["a"], $newResource) !== false) {
The so-called Holy Grail
As I mentioned above, if I disable TinyMCE using that tickbox (which I've actually disabled because with <> it doesn't seem necessary, and it's a little untidy) it reverts to plain text which reveals code, and in that case why not use Ace? Could Ace/CodeMirror not become the fallback when Tiny is disabled?
I disabled pursuit of this feature because I was waiting for someone to request it. In the olden days people developed an attachment for the hideous textarea. I think that bond is about to be severed.
And what is a little untidy about my tickbox? Draw me a picture of what you'd rather see ... then I might consider changing it
Cheers