hi Dimitri,
i think i may have an idea why
using nearly always modx with yams i do not run into that kind of problem as my contents are tvs but if you have a look at this piece of code at the end of codemirror.plugin.php (i plead guilty
)
// when editing a snippet a chunk or else
if (document.getElementById('tv_body') === null) {
var myTextArea = document.getElementsByName('$textarea_name')[0];
myCodeMirror.push(CodeMirror.fromTextArea(myTextArea, config));
}
// pages with one or more TVs
else {
var tv_textareas = $$('#tv_body textarea');
if (tv_textareas.length != 0) {
tv_textareas.each(function(el,t){
myCodeMirror.push(CodeMirror.fromTextArea(el, config));
});
}
}
the first part concerns the pages with no tvs and manages only the first textarea in the ressource editing which is... introtext
var myTextArea = document.getElementsByName('$textarea_name')[0] //this is the guilty part of code
may be replacing the whole code with just
var textareas = $$('textarea');
if (textareas.length != 0) {
textareas.each(function(el,t){
CodeMirror.fromTextArea(el, config);
});
}
would do the trick, managing all the textareas being tvs or not (i haven't tested this code but it sounds logical
)
have swing