Skip to content

Tag: textarea

getting textarea value with newlines javascript

I have an HTML textarea and when data entered, and when submitted a js function takes values form textarea and puts them into a paragraph. but there is newline between textarea values and when the function takes those values it puts them without newlines in the paragraph. Is there any way to make newlines eve…

Highlight specific words in textarea angular 8

I am trying to select a few words from the textarea and create bootstrap chips. I am able to create the chips for selected words. I am trying to highlight the selected words with different background colors. I am not sure how to highlight the words in the selectedText array. I want to highlight all chip words…

How to execute script only after button onclick?

I have a script that auto-replaces specific characters like double spaces into single space and straight quotes into smart quotes in the textarea However, when I try to add onclick feature, it’s not working for me, it’s still executing it before the click of a button (the moment it detects the cha…