Copy Button Preserving Line Breaks

前端 未结 2 1271
暖寄归人
暖寄归人 2020-12-01 14:49

I have some very basic Javascript that copies text upon the push of a button. My problem is that it doesnt preserve line breaks:



        
2条回答
  •  一生所求
    2020-12-01 15:21

    First off, the element doesn't preserve line breaks. You can use the