3 ms·
Thanks for your work in developing this! Does Lexical have a feature to set arbitrary CSS on a particular selection range? I've been looking for a solution to
by tumultco 4y ago
Thanks for your work in developing this!
Does Lexical have a feature to set arbitrary CSS on a particular selection range? I've been looking for a solution to do this since the WebKit's -[WebView applyStyle:] is deprecated as part of WebView Legacy. It isn't clear to me from glancing at the docs if RangeSelection.formatText() or other methods can handle anything or just a subset of styling code. Thanks!
- afd8856 4y agoJust mentioning SlateJS which has [decorations](https://docs.slatejs.org/concepts/09-rendering#decorations https://docs.slatejs.org/concepts/09-rendering#decorations) for this
- acywatson 4y agoYes, we have something like this in @lexical/selection: https://github.com/facebook/lexical/blob/af099ffd9f464b523d66ae4e507e170e62e49860/packages/lexical-selection/README.md#patchstyletext https://github.com/facebook/lexical/blob/af099ffd9f464b523d6...