Update helper code
This commit is contained in:
parent
99c9a87247
commit
c7fc0b00b7
|
|
@ -12,7 +12,7 @@ import popover from '@/helpers/popover';
|
|||
// Also, we probably want to store the text of the selection at least, and maybe even some more for context?
|
||||
|
||||
export interface Highlight {
|
||||
contentBlock: string; // the id
|
||||
page: string; // the id
|
||||
contentIndex: number; // which content of the .contents array do I come from?
|
||||
contentUuid: string; // the wagtail UUID of the content element
|
||||
paragraphIndex: number; // which paragraph inside the textBlock do I come from?
|
||||
|
|
@ -160,7 +160,7 @@ export const getSelectionHandler =
|
|||
|
||||
const { start, end } = range.toCharacterRange(startAncestor);
|
||||
const highlightedText: Highlight = {
|
||||
contentBlock: contentBlock.id,
|
||||
page: contentBlock.id,
|
||||
contentIndex: position,
|
||||
contentUuid: uuid,
|
||||
startPosition: start,
|
||||
|
|
|
|||
Loading…
Reference in New Issue