Edible glues are handy tools for all sorts of baking projects, and a number of different types are commonly used. Royal icing is one of the hardest and most secure, making it good for affixing substantial decorations like candy on a gingerbread house. Piping gel, melted chocolate, gum paste and tylose powder are other standard consumable adhesives. If you need to attach something lightweight, such as edible gold leaf, small confections or little bits of fondant, to a baked good, a thin simple sugar syrup often does the trick.
Combine three parts cold water to one part granulated sugar in a small saucepan. Bring the mixture to a boil, uncovered, on the stove over medium-high heat.
Reduce the burner heat to low as soon as the water achieves a rolling boil.
Stir the mixture of sugar and water slowly but continuously with a spoon until the sugar is completely dissolved. This should take about four minutes. Take a spoonful of water and look closely for sugar crystals; if you still see some, heat and stir a little longer.
Remove the saucepan from the heat when no more sugar crystals are visible. Stir in a few drops of food coloring if you want a colored glue. You could also add a sprinkle of ground cinnamon or nutmeg or a few drops of fruit juice to add flavor to the glue. Transfer the simple sugar syrup to a shallow bowl and let it cool to room temperature.
Brush the sugar glue onto your baked goods with a clean, small cooking or paint brush. Use short, gentle strokes to avoid damaging the food's surface or any layer of icing. Apply the glue to one spot at a time and attach the decorations as you go; the glue dries too quickly to apply it everywhere first and then attempt to secure all the decorations.