{"id":364118,"date":"2022-03-28T11:15:41","date_gmt":"2022-03-28T18:15:41","guid":{"rendered":"https:\/\/css-tricks.com\/?p=364118"},"modified":"2022-03-28T11:15:43","modified_gmt":"2022-03-28T18:15:43","slug":"web-development-bookmarklets","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/web-development-bookmarklets\/","title":{"rendered":"6 Useful Bookmarklets to Boost Web Development"},"content":{"rendered":"\n
A bookmarklet is a JavaScript-based bookmark that adds to a web browser. I\u2019d like to show you some awesome web browser hacks to aid your web development workflow and how to convert those hacks into time-saving bookmarklets.<\/p>\n\n\n\n\n\n\n
Design mode (styled as JavaScript has a mightily simple feature that can render an entire HTML document editable. It works exactly<\/em> like HTML\u2019s Next, type designMode<\/code> since it\u2019s a JavaScript property<\/em>) is for who like to experiment with variations of copy on a live website. For example, copywriters who like to observe how content reads within the flow of the website\u2019s design, or, say, designers who want to ensure that text fits comfortably within a certain space at a certain font size.<\/p>\n\n\n\n
contenteditable=\"true\"<\/code> name-value attribute (or
contentEditable=\"true\"<\/code> in JavaScript) but for the whole document. If you\u2019d like to see how it works, start by entering the browser\u2019s console using the relevant keyboard shortcut:<\/p>\n\n\n\n
document.designMode=\"on\"<\/code> into the console, hit Return<\/kbd><\/strong>, and then click on any text element. You\u2019ll see that this text element (and all other text elements) are now editable simply by clicking on them. This method of editing text on a live website is much<\/em> faster than having to open DevTools, then right-clicking and selecting the \u201cEdit Text\u201d option\u2026 and much<\/em> less tiresome.<\/p>\n\n\n\n