When the RegExp.test() function (which is used by the getElementsByClassName function) sees a . at the begining of the string it tries to match an extra character at the begining of the string. If 'tinymce' is the first or only class in the element's class list, RegExp will not match any values and will not display the editor. I have therefore added a substring(1) to the options.selector variable to remove this period
When the RegExp.test() function (which is used by the getElementsByClassName function) sees a . at the begining of the string it tries to match an extra character at the begining of the string. If 'tinymce' is the first or only class in the element's class list, RegExp will not match any values and will not display the editor. I have therefore added a substring(1) to the options.selector variable to remove this period