Package Exports
- advanced-mark.js
- advanced-mark.js/dist/mark.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (advanced-mark.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
advanced-mark.js
Highlight words, terms, or text on browser page using JavaScript.
To play with this library - Markjs-playground. It requires minimum installation and provides full functionality. Also, it has built-in examples.
What's done:
acrossElements
option - advance across elements pipeline, which boosts performance, allows correctly highlight compressed HTML with the requirementexactly
inmark()
ormarkRegExp()
methodscombinePatterns
option - boosts performance ofmark()
method when highlighting arraycacheTextNodes
option - improves performance ofmark()
method when highlighting arrayseparateGroups
option - allows highlighting RegExp capturing groups instead of matches, handle RegExp with/without thed
flagwrapAllRanges
option - allows highlighting nesting/overlapping ranges and RegExp capturing groupsblockElementsBoundary
option - limits matches within HTML block elements or custom elementsshadowDOM
option - allows highlighting shadow DOM
This library keeps backward compatibility with mark.js
v9.0.0 and npm package v8.11.1 on public API level.
Main doc - Documentation.
Content
- Performance
- Callbacks parameters
- Filtering matches
- Highlight separate groups
- Highlight nesting/overlapping
- Elements boundaries
- Highlight shadow DOM
- Some examples
- RegExpCreator module
Modules changes
- *. es6.*.js now are real ES6 modules
- *.umd.*.js are UMD modules, previously was named as *. es6.*.js
import Mark from './mark.es6.js';
// import Mark from './jquery.mark.es6.js';