Title Case(单词首字母全部大写)
Capitalizes the first letter of each highlighted word.
Script
var SelectedText = editor.getSelectedText();
String.prototype.toProperCase = function () {
return this.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
};
SelectedText = SelectedText.toProperCase()
editor.replaceSelection(SelectedText);