"Mark is not defined" error when using mark.js located in dist folder
See original GitHub issueI need a pure javascript plugin that works with IE 9+ to highlight a given regex expression. I found Mark.js and I managed to make it work, but not with the file recommended in the docs that is inside the /dist/ folder.I’ve tried with both 8.9.1 and 8.10.0 versions.
Steps to reproduce
1 - Added the javascript library in the header tag. Note that this file is inside the dist folder, like is said in the docs. I’ve tried with both “mark.es6.js” and “mark.js”, but what I really want to be working is the ES5 version.
<script type="text/javascript" src="dist/mark.js" charset="UTF-8"></script>
2 - So, in the chrome developer tools console I’ve typed:
new Mark(document.querySelector("#div"));
this didn’t work and give me this output:
Uncaught ReferenceError: Mark is not defined
at <anonymous>:1:1
It worked with mark.js located in /src/ folder though. I’ve created a questions in stackoverflow too: https://goo.gl/Vx685v
Environment
-
Browser name and version Google Chrome 60.0.3112.90 64 bits
-
mark.js version I’ve tried with both v8.9.1 and v8.10.0.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
come on! someone provides the zip we have the same issue!!! and it is 2019!!!
Like mentioned above, I need a test ZIP example to help you.