JSFiddle - React, Tailwind, and code Playground

HTML

<textarea id="txtarea" placeholder="How to stop http being entered into textarea?"></textarea>

JavaScript

$(function(){
	$("#txtarea").keyup(function(){
        console.log(this.value);
    	this.value = this.value.replace(/(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?/mg, ' ');
    })
    
});