JSFiddle - React, Tailwind, and code Playground
HTML
Paste your description in this box and click the Format button:</br>
<textarea id="myTextarea" name="redditFormat" rows="30" cols="75"></textarea></br>
<input type="submit" id="byBtn" value="Format" onclick="change()"/>
JavaScript
function change(){
var input = document.getElementById('myTextarea').value;
input = input.replace(/^/gm, ' ');
var replace = '\n $&';
//Random ones
input = input.replace(/Configuration:/gm, replace);
input = input.replace(/Type:/gm, replace);
input = input.replace(/Data:/gm, replace);
input = input.replace(/Store Result In:/gm, replace);
input = input.replace(/Text:/gm, replace);
input = input.replace(/Long:/gm, replace);
input = input.replace(/Action:/gm, replace);
input = input.replace(/Cat:/gm, replace);
input = input.replace(/Mime \n Type:/gm, '\n Mime Type:');
input = input.replace(/Extra:/gm, replace);
input = input.replace(/Package:/gm, replace);
input = input.replace(/Class:/gm, replace);
input = input.replace(/Target:/gm, replace);
input = input.replace(/Name:/gm, replace);
input = input.replace(/To:/gm, replace);
input = input.replace(/Do Maths:/gm, replace);
input = input.replace(/Append:/gm, replace);
input = input.replace(/Variable:/gm, replace);
input = input.replace(/Search:/gm, replace);
input = input.replace(/Ignore Case:/gm, replace);
input = input.replace(/Multi-Line:/gm, replace);
input = input.replace(/One Match Only:/gm, replace);
input = input.replace(/Store Matches In:/gm, replace);
input = input.replace(/Replace Matches:/gm, replace);
input = input.replace(/Replace With:/gm, replace);
input = input.replace(/Return:/gm, replace);
input = input.replace(/Class Or Object:/gm, replace);
input = input.replace(/Function:/gm, replace);
input = input.replace(/Param:/gm, replace);
input = input.replace(/MS:/gm, replace);
input = input.replace(/Seconds:/gm, replace);
input = input.replace(/Minutes:/gm, replace);
input = input.replace(/Hours:/gm, replace);
input = input.replace(/Days:/gm, replace);
input = input.replace(/Items:/gm, replace);
input =...