0

How do I add span tag for selected text in a group of text using Angular JS.

Html:

<div class="container" #contents 
    [attr.contenteditable]="contenteditable"
    (click)="changeContenteditable($event)"
    (mousemove)="showSelectedText($event)">
    Lorem Ipsum is simply dummied text of the printing and typesetting industry. Lorem Ipsum has been the industry's
</div>

If I select Lorem Ipsum, it should wrapped by span element.

How do I achieve this in angular 7

beruic
  • 5,517
  • 3
  • 35
  • 59
Dhamodaran P
  • 177
  • 2
  • 11

0 Answers0