2

I am using Selectize in an angular project. When we copy multiple values from an excel which are having line breaks in between the values. On pasting these values, line breaks convert into spaces. Can we somehow make it as multi-line?

Like if we paste:

a
b
c

it should paste as it is, including line breaks instead of a b c

palaѕн
  • 72,112
  • 17
  • 116
  • 136
Dev001
  • 276
  • 1
  • 7
  • 25

1 Answers1

-1

I think you can use ng-paste to handle the pasted content, and replace \n of excel to
of HTML

https://www.w3schools.com/angular/ng_ng-paste.asp 

Let me now better your content target to have a better solution ! You may replace input by textarea to handle multiline.

You can check here, many answers to handle paste event in angular : "Paste" event in Angular [ngPaste]

djleop
  • 687
  • 4
  • 18