Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

291
Views
Convert Ordered and Unordered List to readable text with bullets/numbers on pasting in HTML textarea element

I'm trying to find a solution to convert ordered and unordered list from a webpage when copy-pasted to a textarea should be converted to readable list.

Please check following fiddle for better explanation:

https://jsfiddle.net/bodmwghj/2/

<textarea id="final"></textarea>

If we copy paste list from webpage to our input textarea field it loses the "bullets" / "numbers"

Instead if we can prepend the list items with atleast a bullet • symbol and a space that would make more sense and would keep text still readable without having to allow HTML or using tinyMCE editors.

I feel this would be more tricky but if we can append incremental numbers to ordered list, nothing like it, but I am okay to bring bullets there as well if numbers can't be generated on the fly.

So far I could find addEventListener for "paste" event, but I am confused how I can reach the desired solution.

Please let me know if I can explain any further. Hope I can find a solution to this. Any help / possible pointers to solutions is appreciated.

EDIT: Copied text may include formatted HTML and other text. Requirement is only to convert lists. JS Fiddle URL updated.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!