Marker is a tool that can help you mark some words or sentences in website.
But now it is too weak, I will try to make it more interesting.
you can see a simple demo at https://linkgod.github.io/marker/demo
First load Marker via tag:
<linkrel="stylesheet" href="src/markPer.css"><scriptsrc="src/marker.js">You can also load Marker by RequireJS or Sea.js.
init with id attribute
vareditor=newMarker('#marker');init with an element
vareditor=newMarker(document.getElementById('marker'));init with options
varoptions={dom: document.getElementById('marker'),// {DOM Element} [required]type: [{name: '精粹',color: '#00f127'},{name: '糟粕',color: '#a0a0a0'}]}varmarker=newMarker(options);After mark some words or sentences
console.log(marker.getKeywordList());console.log(marker.getTemplet());Licensed under MIT