Open amyworrall opened 1 year ago
@amyworrall has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Continuing my work on NodeSelection, here we have an actual working use case.
This diff does a number of things:
deleteCharacter()
) public as part of BaseSelection
.BaseSelection
transferStartingElementPointToTextPoint()
NodeSelection
, supporting deleting and replacing nodesResponderForNodeSelection
, which is the thing that tracks keyboard input and events when the text view is not handling them. (Note, on iOS, if the TextView is handling events, then a caret or selection will be shown. To do something else, such as NodeSelection where we draw our own borders, we have to tell the TextView to stop handling events.)SelectableDecoratorNode
, which handles the boilerplate for allowing the decorator to respond to clicks.SelectableImageNode
as an example for using this.Future plans:
SelectableDecoratorNode
sSelectableDecoratorNode
class, and there's no way of hooking in earlier than that. Consider making SelectableDecoratorNode
fire the Lexical event and also listen to its own event, instead of handling the tap directly.
SelectableDecoratorNode Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: