Skip to main content
edited tags
Link
Quill
  • 12.1k
  • 5
  • 41
  • 94
deleted 19 characters in body
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

This is my tentative solution to  :

http://meta.codereview.stackexchange.com/questions/1376/how-can-i-prepare-my-code-so-that-i-can-paste-it-formatted

If you need to copy and paste code into the question or answer textarea when solving someone's problem, describing your own, or fixing someone else's formatting, this tool will correct the indentation of the code and prepare it as a code block as understood by the StackExchangeStack Exchange formatter. Pending CR's improvements, it will some day hatch into a bookmarklet, and none of us will hit the space bar repeatedly or alt-tab between browser and IDE ever again.

Fiddle with it here: http://jsfiddle.net/Lay9k/13/here.

EDIT

I am now also specifically looking for feedback of the form "X feature is useless!" so that I can shorten the code.

UPDATE

Revision 14 (http://jsfiddle.net/Lay9k/14/Revision 14) adds the option to not do any language analysis and just prepare the selection as a markdown code block. This encompasses the "tabs to spaces only" mode that was originally planned and requested. The language selection control was split into a <select> and <label> like the other inputs. The default selection (previously "language" to indicate the purpose of the select box) was renamed to reflect its purpose. The list of predefined languages was prepended with generic language descriptions for the existing options.

I am now also specifically looking for feedback of the form "X feature is useless!" so that I can shorten the code.

This is my tentative solution to  http://meta.codereview.stackexchange.com/questions/1376/how-can-i-prepare-my-code-so-that-i-can-paste-it-formatted

If you need to copy and paste code into the question or answer textarea when solving someone's problem, describing your own, or fixing someone else's formatting, this tool will correct the indentation of the code and prepare it as a code block as understood by the StackExchange formatter. Pending CR's improvements, it will some day hatch into a bookmarklet, and none of us will hit the space bar repeatedly or alt-tab between browser and IDE ever again.

Fiddle with it here: http://jsfiddle.net/Lay9k/13/

EDIT

I am now also specifically looking for feedback of the form "X feature is useless!" so that I can shorten the code.

UPDATE

Revision 14 (http://jsfiddle.net/Lay9k/14/) adds the option to not do any language analysis and just prepare the selection as a markdown code block. This encompasses the "tabs to spaces only" mode that was originally planned and requested. The language selection control was split into a <select> and <label> like the other inputs. The default selection (previously "language" to indicate the purpose of the select box) was renamed to reflect its purpose. The list of predefined languages was prepended with generic language descriptions for the existing options.

This is my tentative solution to:

http://meta.codereview.stackexchange.com/questions/1376/how-can-i-prepare-my-code-so-that-i-can-paste-it-formatted

If you need to copy and paste code into the question or answer textarea when solving someone's problem, describing your own, or fixing someone else's formatting, this tool will correct the indentation of the code and prepare it as a code block as understood by the Stack Exchange formatter. Pending CR's improvements, it will some day hatch into a bookmarklet, and none of us will hit the space bar repeatedly or alt-tab between browser and IDE ever again.

Fiddle with it here.

Revision 14 adds the option to not do any language analysis and just prepare the selection as a markdown code block. This encompasses the "tabs to spaces only" mode that was originally planned and requested. The language selection control was split into a <select> and <label> like the other inputs. The default selection (previously "language" to indicate the purpose of the select box) was renamed to reflect its purpose. The list of predefined languages was prepended with generic language descriptions for the existing options.

I am now also specifically looking for feedback of the form "X feature is useless!" so that I can shorten the code.

added 790 characters in body
Source Link
sqykly
  • 950
  • 7
  • 17
Loading
edited tags
Link
200_success
  • 145.7k
  • 22
  • 191
  • 481
Loading
added 129 characters in body
Source Link
sqykly
  • 950
  • 7
  • 17
Loading
Source Link
sqykly
  • 950
  • 7
  • 17
Loading