Add Canvas node ID to node element

Use case or problem

I am trying to target individual node elements to customize using CSS snippets or a custom plugin. Currently it is not possible to preserve any changes after a node element is unloaded from the DOM.

Proposed solution

Add the existing ID of the Canvas node (defined in the .canvas file) as an attribute on the corresponding node element whenever an element is loaded to the DOM.

Current workaround

Adding a custom class to the note contained by a node element allows me to modify the node element styling using the CSS :has selector. In practical use this is very clunky, and this workaround is not possible for images added to the canvas.

Related feature requests

Canvas: Increase Visual Customization Options

4 Likes