facebook / lexical-ios

Lexical iOS is an extensible text editor framework that integrates the APIs and philosophies from Lexical Web with a Swift API built on top of TextKit.
MIT License
549 stars 41 forks source link

New node type API #47

Closed amyworrall closed 1 year ago

amyworrall commented 1 year ago

New node type API Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

amyworrall commented 1 year ago

Instead of having type as a mutable variable, we now have a getType() class function that nodes must override.

The previous API was a poor choice from the early days of Lexical iOS, and the new API makes it a lot more clear how node subclasses should declare their node type.

facebook-github-bot commented 1 year ago

@amyworrall has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

@amyworrall merged this pull request in facebook/lexical-ios@399d547becfdec44c4ce80101e152a8c815e0032.