Featured image of post Copy text from website

Copy text from website

📌 Introduction

When a web page contains text that cannot be copied, these methods make the page editable so that the text can be copied.


💻 Code

// Method 1
document.designMode = 'on';

// Method 2
document.body.contentEditable = 'true';


Licensed under CC BY-NC-SA 4.0
Last updated on Nov 20, 2023 14:48 CST