Hi,
I am having problems getting this function to work:
Extensions.addCommand({
name: 'moveTop',
description: 'Move the current Todo node to the top of the list.',
performCommand: function(editor) {
var cnode = editor.selectedRange().startNode,
pnode = cnode.previousBranch();
//
// Go to the top of the current todo list.
//
while (pnode.type() != 'heading') {
pnode = pnode.previousBranch();
}
//
// Append to top of the list.
//
fcnode = pnode.firstChild();
pnode.insertChildBefore(cnode,fcnode);
}
});
I also can not get commands to run in the Debugger. You can not bring up the command pallet in the debugger, so how are you to debug commands?
All of my todo list are in level one headers. I want to move items to the top, bottom, next list and previous list. I have all of these working, except for this one!
Thanks.
Richard