
Security News
Node.js Homepage Adds Paid Support Link, Prompting Contributor Pushback
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
react-text-range
Advanced tools
// ...
import { TextContainer, RangeState, ReactTextRange } from "./ReactTextRange";
const MyTextContainer: TextContainer = React.forwardRef(({ }, ref) =>
<div ref={ref} className="text-2xl text-gray-300 w-80 bg-yellow-100 select-none p-5 whitespace-pre-wrap" />
);
const App: FunctionComponent = () => {
const [myPos, setMyPos] = useState<RangeState>({ left: 23, right: 47 });
return (
<div style={{ margin: 20 }}>
<ReactTextRange initLeftPos={myPos.left} initRightPos={myPos.right}
Container={MyTextContainer} onChange={setMyPos}
handlerWidth={18}
selectionClass='bg-yellow-300 text-black'
text={`Some text
or even some real good multiline text
here and there`}
/>
<div>
<span>{myPos?.left}</span>
<span>{myPos?.right}</span>
</div>
</div>
)
}
You can set selectionClass, headClass, tailClass, leftHandlerClass and RightHandlerClass in ReactTextRange
FAQs
text selection editor for React
The npm package react-text-range receives a total of 6 weekly downloads. As such, react-text-range popularity was classified as not popular.
We found that react-text-range demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.
Research
Security News
The Socket Research Team investigates a malicious Python typosquat of a popular password library that forces Windows shutdowns when input is incorrect.