Another option would be to have a selector on note cards so that they “lock” to a specific heading, only showing the code under there or at the very least they scroll to that heading when you open the file.
A good use case for this would be for a Dungeon Master’s screen. Rather than creating individual notes for each monster stat block they might want, they might have large notes for related monsters with stat blocks for different monster within the same note. Canvas would be a good way to display multiple of these stat blocks, but it could be inconvenient if they have to scroll down on all the notes to the stat blocks they care about when they load the canvas.