A good justification is not to repeat the logic twice -- on back- and front-end -- so a JS config variable might be the way to go. That would also avoid the need to get the editor preference on the front-end (the "defaultEditor" var).