Skip to content

Latest commit

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Marker

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

Installation

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.

Usage

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());

License

Licensed under MIT

About

Mark some words or sentences in website

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages