In javascript, I wish to insert a call to insertContentControl() at the very end of the document, after any text in the main body. I thought I could do it with:
context.document.getSelection();
var cc = context.document.body.insertContentControl();
cc.color = 'orange';
cc.tag = 'wikindx-bibliography';
cc.title = 'Bibliography';
cc.insertHtml('A reference', "End");
But that simply incorporates existing text in the content control then appends 'A reference' to the content control.