1

I am trying to use text-angular but after every line changes it will auto-generate new

tag for every new line.

1 Answers1

0

According to their documentation, depending on the version you are using, it might be as simple as adding the taDefaultWrap-Attribute and specifying which wrapping-mode you want., e.g.:

<text-angular ng-model="htmlVariable" ta-default-wrap="div"></text-angular>

Documention can be found here: https://github.com/textAngular/textAngular/wiki/Directives

Relevant part from their website:

taDefaultWrap: The name of a HTML tag that will wrap each line by default.

It was implemented due to a request which can be found here: Option to disable default p wrapping

The request included the following examples which should work:

ta-default-wrap="h2"
ta-default-wrap="div"
ta-default-wrap=""   <!-- no tag for new line -->
Florian Lim
  • 5,332
  • 2
  • 27
  • 28