Auto completion for tag values

@taskSloth 's script will cycle through @CME 's places as an excellent alternative to autocompletion:

function TaskPaperContextScript(editor, options) {
    let outline = editor.outline
    let selection = editor.selection
	
    outline.groupUndoAndChanges(() => {
        editor.selection.selectedItems.forEach((item) => {
		if (item.getAttribute("data-place") === "Berlin"){
			item.setAttribute("data-place", "Dublin")
        } else if (item.getAttribute("data-place") === "Dublin"){
			item.setAttribute("data-place", "London")
        } else if (item.getAttribute("data-place") === "London"){
			item.setAttribute("data-place", "Paris")
		} else {
			item.setAttribute("data-place", "Berlin")
		}});
	})
	
	editor.moveSelectionToItems(selection)
}

Application("TaskPaper").documents[0].evaluate({
    script: TaskPaperContextScript.toString()
});