I am looking for a solution to float a button to the top right corner of a text area in an Angular application.
Below is my current code setup, but unfortunately, it does not achieve the desired result:
<textarea matInput matInput rows="15" cols="40" >
<div (click)="formatXml()" class="xmlIcon">
<span matTooltip="'Format Xml'" class="fas fa-search-plus ml-1" ></span>
</div>
</textarea>
.xmlIcon{
padding-right: 20px;
background-position: top right;
background-repeat: no-repeat;
}