You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think facets, as described by BluSky ( https://www.pfrazee.com/blog/why-facets ) are a really good idea and should be the default rich text format for Leaf apps where appropriate.
in ProseMirror, the inline content is modeled as a flat sequence, with the markup attached as metadata to the nodes. This more closely matches the way we tend to think about and work with such text. It allows us to represent positions in a paragraph using a character offset rather than a path in a tree, and makes it easier to perform operations like splitting or changing the style of the content without performing awkward tree manipulation.
This also means each document has one valid representation. Adjacent text nodes with the same set of marks are always combined together, and empty text nodes are not allowed.
This makes a lot of sense, and works in the context of Leaf where each facet can have multiple components, such as an Italic and a Bold component.
So I'm on board with non-overlapping facets with multiple components. 👍
The text was updated successfully, but these errors were encountered:
I think facets, as described by BluSky ( https://www.pfrazee.com/blog/why-facets ) are a really good idea and should be the default rich text format for Leaf apps where appropriate.
In the blusky docs they say that facets should not overlap ( https://docs.bsky.app/docs/advanced-guides/post-richtext ).
At first this seemed odd to me and I figured we would just ignore that. I was thinking "what about bold and Italic on the same text?"
I just recently started working with ProseMirror, though, and found this in their docs ( https://prosemirror.net/docs/guide/#doc.structure ).
This makes a lot of sense, and works in the context of Leaf where each facet can have multiple components, such as an Italic and a Bold component.
So I'm on board with non-overlapping facets with multiple components. 👍
The text was updated successfully, but these errors were encountered: