|
| 1 | +--- |
| 2 | +title: "Canvas" |
| 3 | +date: "2025-01-01" |
| 4 | +author: "" |
| 5 | +published: true |
| 6 | +--- |
| 7 | +The canvas feature in Discourse Graph provides an interactive visual workspace for creating and connecting discourse nodes and relations. Built on top of tldraw, it allows you to visually map out discourse structures with drag-and-drop functionality, adding other visual elements like texts, scribbles, embeddings, and images. |
| 8 | + |
| 9 | +## Creating a new canvas |
| 10 | + |
| 11 | +### Using the command palette |
| 12 | + |
| 13 | +1. Open the command palette (`Cmd/Ctrl + P`) |
| 14 | +2. Search for "Create new Discourse Graph canvas" |
| 15 | +3. Press Enter to create a new canvas |
| 16 | + |
| 17 | + |
| 18 | +The canvas will be created in your configured canvas folder (default: `Discourse Canvas/`) with a timestamp-based filename like `Canvas-2025-01-15-1430.md`. |
| 19 | + |
| 20 | +## Opening and viewing canvas |
| 21 | + |
| 22 | +### Opening a canvas |
| 23 | +1. Open the file of the canvas |
| 24 | +2. In case the file is still in markdown format, you can open the canvas mode by either |
| 25 | + |
| 26 | +Using the command palette |
| 27 | + |
| 28 | + |
| 29 | +Or click on the canvas icon at the top right corner |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +**WARNING: DO NOT MODIFY MARKDOWN CONTENT OF FILE** |
| 34 | + |
| 35 | +## Discourse Nodes |
| 36 | + |
| 37 | +### Creating new discourse nodes |
| 38 | + |
| 39 | +**Using the discourse node tool** |
| 40 | + - Click the discourse node icon in the toolbar |
| 41 | + - Select a node type from the right side panel |
| 42 | + - Click anywhere on the canvas to place a new node |
| 43 | + - Or drag the selected node type to the canvas |
| 44 | + - Enter the node title in the modal that appears |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +### Adding existing nodes |
| 50 | + |
| 51 | +**Using node search** |
| 52 | + - Use the search bar in the top-right of the canvas |
| 53 | + - Type to search for existing Discourse Nodes |
| 54 | + - Click on a node from the search results to add it to the canvas |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +**Search filtering** |
| 59 | + - When a specific node type is selected, search results are filtered to that type |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +## Discourse relations |
| 65 | +### Create new relations between nodes |
| 66 | + - Click the discourse node icon in the toolbar |
| 67 | + - Click the type of relations you want to create between two nodes |
| 68 | + - Click and drag the arrow from the source node to target node |
| 69 | + |
| 70 | +  |
| 71 | + |
| 72 | + *Note*: The relation type selected must be compatible between the source and target nodes. Otherwise, you will receive a relation tool error. To update the setting on what relation types are possible between two kinds of Discourse Nodes, you can change the setting [Relation Types setting](./relationship-types#configuring-valid-relationships) |
| 73 | + |
| 74 | +  |
| 75 | +### Adding existing relations |
| 76 | + - Click on the discourse node you're trying to add existing relations of |
| 77 | + - Click on the "Relations" button that pops up. You'll see a panel showing all the relations that this node has |
| 78 | + - Click on the '+' or '-' to add these relations to the canvas |
| 79 | + + For relations whose target Discourse Node isn't on canvas yet, it will be added to the canvas along with the relation |
| 80 | + |
| 81 | + |
| 82 | +  |
| 83 | + |
| 84 | +## Canvas Features |
| 85 | + |
| 86 | +### Auto-save |
| 87 | + |
| 88 | +- Changes are automatically saved to the markdown file |
| 89 | +- No manual save required |
| 90 | +- File updates preserve the markdown structure and block references |
| 91 | + |
| 92 | +### Export Options |
| 93 | + |
| 94 | +- **Markdown View**: Switch to see the underlying markdown structure |
| 95 | +- **SVG Export**: Export canvas as SVG image (via tldraw) |
| 96 | +- **PNG Export**: Export canvas as PNG image (via tldraw) |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +## Troubleshooting |
| 101 | + |
| 102 | +### Common Issues |
| 103 | + |
| 104 | +**Canvas Won't Load**: |
| 105 | +- Check that the file has proper frontmatter with `tldr-dg: true` |
| 106 | +- Verify the JSON data block is properly formatted |
| 107 | +- Try switching to markdown view and back to canvas view |
| 108 | + |
| 109 | +**Relations Won't Connect**: |
| 110 | +- Ensure the node types allow the relation type you're trying to create |
| 111 | +- Check your discourse relation configuration in settings |
| 112 | +- Verify both nodes are valid discourse nodes |
| 113 | + |
| 114 | +**Performance Issues**: |
| 115 | +- Consider splitting large canvases into multiple smaller ones |
| 116 | +- Close other resource-intensive applications |
| 117 | + |
| 118 | +**Search Not Working**: |
| 119 | +- Verify nodes have proper frontmatter with `nodeTypeId` |
| 120 | +- Check that the Obsidian metadata cache is up to date |
| 121 | +- Try restarting Obsidian to refresh the cache |
| 122 | + |
| 123 | +### Getting Help |
| 124 | + |
| 125 | +If you encounter issues with the canvas feature, reach out to our dev team via [Slack](https://join.slack.com/t/discoursegraphs/shared_invite/zt-37xklatti-cpEjgPQC0YyKYQWPNgAkEg) |
0 commit comments