facebook / facebook/lexical

Discussion: Cross platform (web/iOS) compatibility for TextNode 'style' field

Open
#4,286 0 comments 0 reactions 0 assignees View on GitHub
core discussion
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
55

Description

Please see [Issue 20 on facebook/lexical-ios](https://github.com/facebook/lexical-ios/issues/20) for a description!

I would like to discuss this issue with anyone who is interested in cross-platform compatibility of Lexical data models, be it via JSON serialization (possible today) or via collaborative editing (coming in the future on iOS), hence posting an issue in the Lexical JS repository as well as in Lexical iOS.

The TLDR is, TextNode has a `style` field, which is arbitrary CSS information. Lexical iOS is not styled via CSS, and currently we don't handle this field. The question is what should we do -- attempt to convert the data, come up with a universal format, or just let the two platforms approach styling of text nodes separately and punt the problem on to the API consumer to handle syncing them up. Or maybe there's an approach I haven't thought of yet.

Comments and discussions welcome.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.