Good day,
Is there’s a way to get the current paragraph from highlighted text?
sample paragraph : Powerful document functionality → and I highlighted the document, I would like to get the Powerful document functionality paragraph. Sample code is for selected/highlighted text only:
const textItems = instance.UI.textPopup.getItems();
instance.UI.textPopup.add({
type: ‘actionButton’,
label: ‘AddTag’,
dataElement: ‘addTag’,
//img: “”, icon
title: “Add Tag”,
onClick: () => {
const selectedText = instance.Core.documentViewer.getSelectedText();
console.log(selectedText);
},
},
textItems[0].dataElement);
Thanks.