# insertChildNodeHelloWorld by Dan Rahmel # -- Very simple code example that shows how to insert a child node and # set the headline and body text. Note that the new node will not be # visible until the headline pane is redrawn.

# Paste this code into the body of a Leo node and select # Edit > Execute Script to run it.

import leoGlobals as g

current = c.currentPosition() newchild = current.insertAsLastChild() newchild.setHeadStringOrHeadline("Hello Headline World!") newchild.setBodyStringOrPane("Hello Body World!")