Do you want to: Suggest a feature / Report a bug / Ask a how-to question
For feature suggestions, describe the result you would like to achieve in detail:
For bug reports, provide the steps to reproduce and if possible a minimal demo of the problem:
Document Server version:
Additional information:
Any relevant details about the situation. You can also attach images and videofile to the post (or to place them to external storage)
using below code to to select certian text from a pharagraph and add as a bookmark. Instead of adding as a bookmark, how to add selected text as a content control to display in left pane, so that when user clicks on content control , cursor will be pointed to exact location in the document. Just to mention document doesn’t have any content controls inside a document.
var oTextPr; var oParaPr;
var oDocument = Api.GetDocument();
//header Test
var totallength = 0;
console.log("Number of elements oDocument : " + oDocument.GetElementsCount());
for(let i=0;i<oDocument.GetElementsCount();i++)
{
var ephara=oDocument.GetElement(i);
var paratext=ephara.GetText();
var oContentLength = paratext.length;
try{
oFontName = paratext.GetFontNames();
} catch(error) {
}
oRange.AddBookmark("Error at :" +paratext);
console.log("element :" +i + "oDocument get element:" + paratext);
}
}totallength += oContentLength;
}
[/quote]