add_node = function(x, y, node, parent_surface_node, font) local surface_node = { x=x, y=y, width=600, type='text', data=split_lines(header(node)..'\n'..dehtml(node.content)), bg={r=0.7,g=0.7, b=1.0}, toot_id=node.id, } compute_layout(surface_node, surface_node.x, surface_node.y, Surface, font) if parent_surface_node then add_edge(surface_node, parent_surface_node) end return surface_node end