Helps on understanding Facet.

Hello! I’m very new to CodeMirror6 and I’m still learning it. I found the concept of Facet a bit harder to grasp. After reading over the System Guide and Reference Manual I still have some troubles understanding what a Facet really is and what it is for. Can somebody please explain a bit to me. Thank you!

It’s a configuration point where multiple (unrelated) pieces of code can provide a value, which the facet stores and (optionally) combines, allowing code that wants to use it to retrieve the result from the state object. It’s a rather general thing, and used in very different way (from registering event handlers to setting the tab size.) If you have more specific questions, let me know.

1 Like