Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#breakButton").before('<button id="reindentButton" class="blueButton rhs" onclick="reindent()">Reindent</button>')
- var indent_script = document.createElement('script');
- indent_script.appendChild(
- document.createTextNode('function reindent(){var doc = $(".CodeMirror").first()[0].CodeMirror;\
- for(var i = doc.lineCount() - 1; i >= 0 ; i--){\
- doc.indentLine(i, "smart");\
- }}'))
- document.head.appendChild(indent_script)
Add Comment
Please, Sign In to add comment