1.2.1 • Published 2 years ago

keyword-linker v1.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

Add hyperlinks from keywords (关键词加超链接)

Generate links for documentation from given keywords. http://github.com/wuliupo/keyword-linker

Usage(使用方法)

// Prepare(准备参数)
var keywords = [ { text: '盘古大帝', priority: 10, max: 3 }, { text: '盘古', priority: 1, max: 3 } ];
var config = { replacement: '<a href="#KEYWORD">KEYWORD</a>', placeholder: 'KEYWORD', max: 10 };
var kl = new KeywordLinker(keywords, config);

// Render for a DOM (直接渲染网页内容)
kl.addLink2Dom(aDom);

// Render for a string (替换字符串)
var newContent = kl.addLink2String(content);
1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago