Skip to content

Commit

Permalink
[docs] Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ashubham committed Feb 19, 2018
1 parent 6bfe734 commit 70dd9e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,26 @@ let markee = new Markee(el /* Target element */, {
// marked selection.
console.log(text, startIdx, endIdx);
}
}
);
});
```
## Options

```typescript
let markee = new Markee(el, {
initialText: '', // text to be made markeeable.
startIdx: 0, // Start of initial selection.
endIdx: 1, // End of initial selection.
initialText: '', // text to be made markeeable.
startIdx: 0, // Start of initial selection.
endIdx: 1, // End of initial selection.

/* The callback which is called when a user changes the marked selection. */
onMarked: (text: string, // selected text.
startIdx: number, // index of the start.
endIdx: number // index of the end.
) => void,
onMarked: (text: string, // selected text.
startIdx: number, // index of the start.
endIdx: number) // index of the end.

markerClass: 'marker', // CSS class for drag handle.
tokenClass: 'token', // CSS class for text token.
beginClass: 'begin', // CSS class for the begin marker.
endClass: 'end', // CSS class for the end marker.
selectedClass: 'selected', // CSS class for the marked selection.
draggedClass: 'dragged', // CSS class for the drag handle when being dragged.
markerClass: 'marker', // CSS class for drag handle.
tokenClass: 'token', // CSS class for text token.
beginClass: 'begin', // CSS class for the begin marker.
endClass: 'end', // CSS class for the end marker.
selectedClass: 'selected', // CSS class for the marked selection.
draggedClass: 'dragged', // CSS class for the drag handle when being dragged.
})
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markee",
"version": "0.3.7",
"version": "0.3.8",
"description": "Visual markers for selected text",
"main": "dist/markee.js",
"typings": "build/index.d.ts",
Expand Down

0 comments on commit 70dd9e9

Please # to comment.