Removing line breaks/new lines when copying

This commit is contained in:
Vivek Teega 2019-05-11 18:12:36 +05:30
parent 00f65d1130
commit b69039e4d9

View File

@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viSewport" content="width=device-width, initial-scale=1.0">
<title>Smart Contract Creator</title>
<meta name="description" content="Natural Language Form used to create text to incorporate or participate " />
<meta name="keywords" content="Natural Language, Smart Contract, Ranchi Mall, Blockchain Contract, html5, css3, jquery" />
@ -55,7 +55,7 @@
</header>
<div class="main clearfix">
<form id="nl-form" class="nl-form">
Create Smart Contract with the name <input type="text" value="" placeholder="India-elections-2019" data-subline="For example: <em>Land-ownership</em> or <em>My-Will</em>" />@ <br />of the type
Create Smart Contract with the name <input type="text" value="" placeholder="India-elections-2019" data-subline="For example: <em>Land-ownership</em> or <em>My-Will</em>" />@ <br/>of the type
<select>
<option value="1" selected>one-time-event</option>
</select>* using the asset <input type="text" value="" placeholder="rmt" data-subline="For example: <em>rmt</em> or <em>alphacoin</em>" /># at the address <input type="text" value="" placeholder="FLO Address" data-subline="For example: <em>FFE1n1rAeCwAhtj2iQMEfmtHgeASGPvM4e</em> or <em>FDFyvAMqbiNSQ4JMEMG2DQ2s8y73yMFM1S</em>" />$ with contract-conditions: (1) contractAmount=<input type="text" value="" placeholder="0.001rmt" data-subline="For example: <em>5rmt</em> or <em>4alphacoin/em>" /> (2) userChoices=<input type="text" value="" placeholder="Narendra Modi wins| Narendra Modi loses" data-subline="For example: Write your contract conditions separated by '|' " /> (3) expiryTime=
@ -99,7 +99,7 @@
/* Get the text from form and create new element for copying */
var copyText = document.getElementById("nl-form");
var textarea = document.createElement('textarea');
textarea.value = copyText.innerText.slice(0, -5);
textarea.value = copyText.innerText.slice(0, -5).replace(/\n/g, " ");
document.body.appendChild(textarea);