Highlighter jQuery Plugin has been deprecated and is no under active development any more. For new integrations, it's highly recommended to use Highlighter JS instead.
The jQuery plugin is distributed with the Highlighter Server and can be referenced at URL
The latest version of the plugin script file can be found at
Add it to your HTML page after including jQuery. For example:
The plugin is mostly data-driven and requires only a couple of configuration options to initialize.
Configuration Object Options
The following plugin configuration options are available:
highlighterUrl- URL to Highlighter service used (cloud or self-hosted).
resolveDocumentBase- Set to true if you want the plugin to resolve relative href's using the URL of the current page. If set to string, its value will be used as a base URL. Otherwise, href value will be sent to Highlighter as it is.
resolveXmlBase- The same as above but for Adobe highlights XML location.
updateHref- By default, the plugin handles clicks on managed page elements (i.e. links). Set this option to true if you want the plugin to update the element's href attribute instead.
updateAttr- Name of HTML element attribute to update with created highlighting request URL.
viewerUrl(deprecated) - If present, viewerUrl will be prepended to URI-encoded highlighted document location. This option was used to open document in an alternative PDF viewer like PDF.js. Use of this option is deprecated as Highlighter now comes with a customized version of PDF.js viewer.
filterQuery: function(query) - Listener function used to filter query string before sending it to Highlighter.
onHighlightingLinkClick: function(link) - Link click listener. If it returns false, click will be ignored.
onHighlightingResult: function(results) - Listener for highlighting response JSON object. If it returns false, further processing (e.g. document open) will be prevented.
Supported Data Attributes
Data attributes generally correspond to the web service request parameters:
href- The plugin checks the element's href attribute first, but, if not set, it will check the data-href attribute as well. The value may be transformed in accordance with the resolveDocumentBase option and is sent to the service as uri parameter.
xml- For compatibility with existing applications that use Adobe PDF highlight files, the plugin will first lookup for xml file reference in href fragment and query string. If not found, it will check the xml data attribute presence as well.
view-url- PDF document location to use in Highlighting PDF viewer instead of
For detailed parameters description, see Highlighter API documentation.
Parameters common to multiple elements can be specified on a common parent. See them in action at https://api.highlight4.me/examples/