You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The objective of this task is to migrate away from using TextKit 1 APIs in iOS implementation of Live Markdown.
Current state
Currently, we access .layoutManager property which causes RCTUITextView to switch back to TextKit 1 compatibility mode with the following warning:
UITextView 0x108021a00 is switching to TextKit 1 compatibility mode because its layoutManager was accessed.
Break on void _UITextViewEnablingCompatibilityMode(UITextView *__strong, BOOL) to debug.
Previous attempts
Define class MarkdownTextLayoutManagerDelegate that conforms to NSTextLayoutManagerDelegate
Create an instance of this class in [MarkdownTextInputDecoratorView didMoveToWindow:]
Store the instance using a strong pointer as a private field
Assign an instance of this class to _textView.textLayoutManager.delegate (this is a weak pointer!)
Define class MarkdownBlockquoteTextLayoutFragment that inherits from NSTextLayoutFragment
Implement drawAtPoint:inContext: to draw a rectangle and set a breakpoint inside
Implement textLayoutManager:textLayoutFragmentForLocation:inTextElement: method that returns an instance of MarkdownBlockquoteTextLayoutFragment
This worked successfully, however there was a new issue with alternating content offset on each keypress (see #144 (comment) for details).
Objective
The objective of this task is to migrate away from using TextKit 1 APIs in iOS implementation of Live Markdown.
Current state
Currently, we access
.layoutManager
property which causesRCTUITextView
to switch back to TextKit 1 compatibility mode with the following warning:Previous attempts
MarkdownTextLayoutManagerDelegate
that conforms toNSTextLayoutManagerDelegate
[MarkdownTextInputDecoratorView didMoveToWindow:]
_textView.textLayoutManager.delegate
(this is a weak pointer!)MarkdownBlockquoteTextLayoutFragment
that inherits fromNSTextLayoutFragment
drawAtPoint:inContext:
to draw a rectangle and set a breakpoint insidetextLayoutManager:textLayoutFragmentForLocation:inTextElement:
method that returns an instance ofMarkdownBlockquoteTextLayoutFragment
This worked successfully, however there was a new issue with alternating content offset on each keypress (see #144 (comment) for details).
Resources
The text was updated successfully, but these errors were encountered: