Well hello there Test...
Actually you cannot find code for it anywhere since it's built in functionality in browser's implementation of execCommand (search google contenteditable +execCommand).
in /lib/editor/htmlarea.php you can find prototype called HTMLArea.execCommand which does all function calls for toolbars action.
- Janne -