0.0.17 • Published 1 year ago

@hocgin/marks v0.0.17

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@hocgin/marks

文本标注

草稿

let [list, {save, remove}] = useMarksStorage();

let {mark, unmark, unmarkAll} = useMarksSelector({
  el,
  defaultValue: list,
  onMarked: (item) => {
    save(item);
  },
  onUnMarked: (item) => {
    remove(item.uid);
  }
});

let uid = mark([{text, offset, storeRenderOther}])

unmark(uid)

依赖或参考 lib

incubator-annotator

Pkg: https://github.com/apache/incubator-annotator Demo: https://annotator.apache.org/demo/ Demo.Source: https://github.com/apache/incubator-annotator/blob/b52460a94ea91587ea96ecb77debc827d71b2920/web/index.js

js-mark

Pkg: https://github.com/BigCoal/js-mark Demo: http://webviews.cn/js-mark/

mark.js

Pkg: https://github.com/julkue/mark.js Demo: https://www.cnblogs.com/yangyukeke/p/17730681.html

参考资料

react-mark

0.0.17

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.3

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.6

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago