Skip to main content

The PreTeXt Guide

Section D.7 Spell Checking Output

While browsing your HTML output, it is possible to have the web browser’s native spell checker highlight spelling errors. Create a bookmark with the following for its URL (all at once on one line, there are three lines here just for clarity):
javascript:document.body.contentEditable=!document.body.isContentEditable;
document.designMode=(document.designMode === 'on') ? 'off' : 'on';
void 0
Now when viewing a page and you click this bookmarklet, JavaScript will change browser settings so that the native spell checker highlights spelling errors. This is done by making the text content of the page editable, which is normally what is needed for the browser’s spell checker to kick in. While this is active, you will not be able to click most links and buttons. Click the bookmarklet again to toggle things back to how they were.
Some browsers may have extensions that you can install for spell checking the content of a page. For example, Chrome has Webpage Spell-Check.