Open jcubic opened 9 months ago
I've found a workaround, it seems that this is caused by background on Text created for Code or Pre tags.
Adding this Dummy Text component as Pre and Code solves the issue:
import { type FC, type ReactNode } from 'react';
import { Text } from 'react-native';
const DummyText: FC<{children: ReactNode}> = ({ children }) => {
return <Text>{children}</Text>;
};
const Component = () => {
return (
<SyntaxHighlighter
language={language}
style={atomOneLight}
fontSize={fontSize}
PreTag={DummyText}
CodeTag={DummyText}
highlighter={'hljs'}
>
{ content }
</SyntaxHighlighter>
);
}
When using a TextInput element the cursor disappears when inside color Text.
The cursor only appears when it's at the end of the line.
this is my code: