-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text is not Selectable. #230
Comments
Any update on this? |
重写text、textgroup标签,给Text增加selectable属性即可 ...other code
interface ITextNode {
key: string;
content: string;
}
interface IStylesNode {
text: object;
textgroup: object;
}
const rules = {
text: (
node: ITextNode,
children: unknown,
parent: unknown,
styles: IStylesNode,
inheritedStyles = {},
) => (
<Text key={node.key} style={[inheritedStyles, styles.text]} selectable>
{node.content}
</Text>
),
textgroup: (
node: ITextNode,
children: unknown,
parent: unknown,
styles: IStylesNode,
) => (
<Text key={node.key} style={styles.textgroup} selectable>
{children}
</Text>
),
};
function APP(){
return (
<Markdown rules={rules} style={styles}>
{markdown}
</Markdown>
);
} |
I implement this with the SelectableText to hover a menubar instead of defualt menu of device when user select the text from the markdown
with this property [ Maybe this will assist you. |
Output of the markdown text is not selectable to frontend side, Can not copy or other actions within Texts.
The text was updated successfully, but these errors were encountered: