feat(mobile): make chat text selectable on Android (#8779)
Co-authored-by: shivam <[email protected]>
This commit is contained in:
1 parent
5f878d2a85
commit
09d13de438
10 files changed
+246
-23
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import {
|
||||
SelectableMarkdownText as T3SelectableMarkdownText,
|
||||
type SelectableMarkdownTextProps,
|
||||
} from "@t3tools/mobile-markdown-text/renderer";
|
||||
|
||||
import { highlightCodeSnippet } from "../features/review/shikiReviewHighlighter";
|
||||
|
||||
type MobileSelectableMarkdownTextProps = Omit<SelectableMarkdownTextProps, "highlightCode">;
|
||||
|
||||
export type {
|
||||
MarkdownImageRequest,
|
||||
NativeMarkdownTextStyle,
|
||||
SelectableMarkdownSkill,
|
||||
} from "@t3tools/mobile-markdown-text/types";
|
||||
|
||||
// The renderer falls back to React Native Text outside iOS, so Android can use
|
||||
// the same Markdown chunking while retaining native text selection.
|
||||
export function hasNativeSelectableMarkdownText(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function SelectableMarkdownText(props: MobileSelectableMarkdownTextProps) {
|
||||
return <T3SelectableMarkdownText {...props} highlightCode={highlightCodeSnippet} />;
|
||||
}
|
||||
Reference in new issue
Block a user