Grammar extension for Czech to wrap words
The Czech language has special rules to wrap words in copy text, so that single characters or numbers at the end of a line should be moved to the next line for better reading experience. We create a JavaScript extension, that apply those rules and formats the copy text on the website.
<html>
<head>
</head>
<body>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="jquery.czText.js"></script>
</body>
</html>
$(document).ready(function () {
$('p').czText();
window.onresize = function () {
$('p').czText('refresh');
};
});