curlyquotes
Dynamically apply smart curly quotes to your web page.
yarn add curlyquotes
curlyquotes
The code snippet above will detect all straight quotes and convert them to smart versions, and will continue to observe changes in the DOM tree and apply the changes.
Usage
DOM
Notes:
The following three DOM methods of curlyquotes
accept an optional Node, which
falls back to document.body
if omitted.
/** * Recursively walk through and convert all child nodes * of `rootNode`. */ /** Starts observing the `node`. */ /** Stops all observations started by `observe` to `node`. */ /** Provide a CSS selector used to ignore matched nodes. */ /** Returns a new string with smartquotes applied. */
Supported Browsers
The latest three versions of all evergreen browsers.