I tried a lot ways such as .trim() or replace bot nothing worked. https://jsbin.com/biguqe/4/edit?html,js,console,output
Here is my html. I need on click to get the content within 'code' tag exactly as it is. But I get the content with the whitespace that you see from the edge of the screen to the content.
<div class="wrapper">
<code class="copyable">
<dummyTag<br>
id="page"<br>
navButtonPress="onNavBack"<br>
showNavButton="{device>/system/phone}"<br>
title="{i18n>detailTitle}"<br>
busy="{detailView>/busy}"<br>
busyIndicatorDelay="{detailView>/delay}"><br><br>
<dummyTag:positiveAction>
<<dummyTag:PositiveAction id="approveButton" press="onApprove" text="{i18n>xbut.approve}"/><br>
</dummyTag:positiveAction><br>
<dummyTag:negativeAction><br>
<dummyTag:NegativeAction id="rejectButton" press="onReject" text="{i18n>xbut.reject}"/><br>
</dummyTag:negativeAction><br>
<br>
<semantic:content><br>
</code>
<button class="arrangeButton">Arrange</button>
</div>
Here is my code: https://jsbin.com/biguqe/4/edit?html,js,console,output