0.1.3 • Published 5 years ago
vue-text-annotation-box v0.1.3
vue-text-annotation-box
A vue2 component for manual text annotation
Concept
// initial annotations:
[
{
word: "James",
label: "name",
},
];
// latest annotations:
[
{
word: "James",
label: "name",
},
{
word: "basketball",
label: "sports",
},
{
word: "🏀 ",
label: "emoji",
},
];Installation
npm install --save vue-text-annotation-boxDemo
ES6 Modules
import textAnnotationBox from "vue-text-annotation-box";<text-annotation-box v-model="annotations" :text="text" />Props API
| Props | Description | Type | Must Required | Default |
|---|---|---|---|---|
| v-model | { "word": "James", "label": "name" },{ "word": "basketball", "label": "sports" },... | annotation[] | yes | [] |
| text | text | String | yes | |
| color | theme color | String | no | '#577eba' |
| maxHeight | max height of text annotation box | String or null | no | null |
# install dependencies
npm install
# compiles and hot-reloads for development
npm run serve
# compiles and minifies for production
npm run build0.1.3
5 years ago