#10760
Yutaka Emura
Keymaster

You are right; the above code was to comment in all cases.

To toggle the comment, it will a little more complicated. To uncomment in all cases, here is the code:

if( document.selection.IsEmpty ){
editor.ExecuteCommandByID(4154);
}
editor.ExecuteCommandByID(4372);

Thanks!