No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

⚡️ options to use while unmarking

These options can be used with any of the markers. For ex:

// example <RegExpMarker mark={/ipsum/g} unmarkOptions={{ element: "span", }} > Lorem, ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus voluptas, tempora similique ratione explicabo cumque ex itaque vero repudiandae. Non, molestias! Alias vitae facilis ut ducimus voluptates quod repellat unde? </RegExpMarker>

...and also with the useMarker hook for advanced usage by passing an object of options as the first argument of marker.unmark() method:

const { marker, markerRef } = useMarker(); const unmark = useCallback(() => { marker.unmark({ /* any of the options mentioned below*/ }); }, [marker]);
OptionTypeDefaultDescription
elementstring""Will remove only marked elements with this specific element
classNamestring""Will remove only marked elements with this specific class name
excludearray[ ]An array with exclusion selectors. These elements will be ignored. Example: "filter": ["h1", ".ignore"]
iframesbooleanfalseWhether to search also inside iframes. If you don't have permissions to some iframes (e.g. because they have a different origin) they will be silently skipped. If you don't want to search inside specific iframes (e.g. facebook share), you can pass an exclude selector that matches these iframes
iframesTimeoutnumber5000The maximum ms to wait for a load event before skipping an iframe. Especially important when there's no internet connection or a browser "offline" mode is enabled and an iframe has an online src – then the load event is never fired
donefunctionA callback function after all marked elements were removed
debugbooleanfalseSet this option to true if you want to log messages
logobjectconsoleLog messages to a specific object (only if debug is true)