SyedWasiHaider / vue-highlightable-input

A vue component to highlight text as you're typing
MIT License
183 stars 30 forks source link

new line or \n | \r to <br /> #20

Open carloslema opened 5 years ago

carloslema commented 5 years ago

Hi Syed, thanks for this awesome Vue highlighter — I am wondering, have you looked into converting new lines or the \n or \r to <br>? I am trying to figure this out by looking in two places (probably not the right places):

  1. In the "safe_tags_replace"
  2. save/restore selection

Any help will be much appreciated. \carlos

Blaked84 commented 4 years ago

Hi @carloslema, have you come up with a solution?

Is it the same issue as the one bellow? Line breaks are deleted when I edit the text.

amitbrickman commented 4 years ago

Hey guys! @Blaked84 I have the same issue. Is there any solution for this thing? BTW awesome library

Blaked84 commented 4 years ago

Hey guys! @Blaked84 I have the same issue. Is there any solution for this thing? BTW awesome library

No sorry, I switched to another library.

ndphuong commented 4 years ago

Hey guys! @Blaked84 I have the same issue. Is there any solution for this thing? BTW awesome library

No sorry, I switched to another library.

Hi @Blaked84 , which library you switch to ?

Blaked84 commented 4 years ago

Hi @Blaked84 , which library you switch to ?

@ndphuong I use https://github.com/Blaked84/highlight-within-textarea

It's a fork of a lib initially designed for jQuery but converted to vanilla js.