Managing style-related attributes on a node

We’d like to create a few nodes that define style-related attributes. Curious about high-level feedback, and more broadly how managing style-related attributes fits into PM.

Here are some examples:

  • An image node that has various positions: left (i.e. float: left), right (i.e. float right), full (span full width of text), normal (centered but smaller image size than full).
  • A 2x2 grid of images, which would stack on top of each other for narrow device screens (4x1)
  • A 2x1 grid of images which should always be shown side-by-side regardless of device screen width

Could you ask a more concrete question? Is the issue how to give the user control over those attributes? If so, you could have a drop-down menu item show up when such an element is selected, which allows the user to choose from a set of styles. Would that work for you?

I’d eventually also like to allow overlay widgets on nodes when they are selected, to make things like this more elegant. But I haven’t gotten around to implementing that yet. Opened an issue (#132) to track that plan.

Sorry for the ambiguity.

Giving users control over those attributes seems straightforward, as PM allows for any arbitrary UI to be built.

I’m wondering about the rendering layer of the editor. Will a node have control over how it is presented in the editor, based on the state of its attributes?

Oh, right. Yes, definitely. Pretty much all nodes that have attributes use them in rendering. The Image node is an example.

Cool, thanks :slight_smile: