Made formatJavascript take the active editor's tablength

Before, the global preference tab length was used, which caused
some annoyances when a user would set tab length by using init
scripts or had changed them otherwise separate from the global
config.