Text word map generator

Developer
Size
2,264 Kb
Views
16,192

How do I make an text word map generator?

Testing word map size generator, could probably do with a refactor and use of array.map. What is a text word map generator? How do you make a text word map generator? This script and codes were developed by Rich Williams on 07 December 2022, Wednesday.

Text word map generator Previews

Text word map generator - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Text word map generator</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <h1>Text Word Map generator</h1> <textarea name="" id="" cols="30" rows="10" class="text-for-map mb form-control"></textarea> <div class="word-map mb"> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Text word map generator - Script Codes CSS Codes

.container { padding-top: 20px;
}
.mb { margin-bottom: 10px;
}

Text word map generator - Script Codes JS Codes

$(function () {	var $tfm = $(".text-for-map"),	$wm = $(".word-map");	var re = /\W+/g;	$tfm.change(function () {	// split up words	var text = $tfm.val();	var textArr = text.split(re),	textObj = {};	// populate text object	for ( var i = 0, len = textArr.length; i < len; i ++ ) {	if ( textObj[textArr[i]] ) {	textObj[textArr[i]].count += 1;	} else {	textObj[textArr[i]] = { count : 1 };	}	}	// generate word map	for ( var word in textObj ) {	$("<div />", {	class : "btn btn-default",	text : word,	css : { "font-size" : (textObj[word].count * 0.3 + 0.5) + "em" }	}).appendTo($wm);	}	});
});
Text word map generator - Script Codes
Text word map generator - Script Codes
Home Page Home
Developer Rich Williams
Username toneworm
Uploaded December 07, 2022
Rating 3
Size 2,264 Kb
Views 16,192
Do you need developer help for Text word map generator?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Rich Williams (toneworm) Script Codes
Create amazing art & images with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!