• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html lang="en">
3	<head>
4		<title>Hyphenator.js</title>
5		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
6		<style type="text/css">
7			body {
8				width:30%;
9				margin-left:35%;
10				margin-right:35%;
11			}
12			.text {
13				text-align:justify;
14			}
15		</style>
16		<script src="Hyphenator.js" type="text/javascript"></script>
17		<script type="text/javascript">
18			/* <![CDATA[ */
19			var hyphenChar = '•';
20			Hyphenator.config({
21				hyphenchar: hyphenChar,
22				minwordlength: 2,
23				onhyphenationdonecallback: function () {
24					var bdy = document.getElementsByTagName('body')[0];
25					bdy.innerHTML = bdy.innerHTML.replace(new RegExp('\\'+hyphenChar, 'g'), '<span style="color: red">' + hyphenChar + '</span>' + String.fromCharCode(8203));
26				}
27			});
28			Hyphenator.run();
29			/* ]]> */
30		</script>
31	</head>
32	<body>
33		<h1>Example of using Hyphenator.js</h1>
34		<h2>Amharic</h2>
35		<p class="hyphenate text" lang="am">እስመ&nbsp;፡ አግዚአብሔር&nbsp;፡ አምላክ&nbsp;፡ ማእምር&nbsp;፡ ውእቱ&nbsp;። እግዚአብሔር&nbsp;፡ አስተደወ&nbsp;፡ መንብሮ&nbsp;። ወአድከመ&nbsp;፡ ቅሥተ&nbsp;፡ ኀያላን&nbsp;። ወአቅነቶሙ&nbsp;፡ ኀይለ&nbsp;፡ ለድኩማን&nbsp;። ጽጉማን&nbsp;፡ እክል&nbsp;፡ ርኅቡ&nbsp;። ወርኁባን&nbsp;፡ ጸግቡ&nbsp;። እስመ&nbsp;፡ መካን&nbsp;፡ ወለደት&nbsp;፡ ሰብዐተ&nbsp;፡ ወወለድሰ&nbsp;፡ ስእነት&nbsp;፡ ወሊደ&nbsp;፡ እግዚአብሔር&nbsp;፡ ይቀትል&nbsp;፡ ወየሐዩ&nbsp;። ያወርድኒ&nbsp;፡ ውስተ&nbsp;፡ ሲእል&nbsp;፡ ወየዐርግ&nbsp;። እግዚአብሔር&nbsp;፡ ያነዲ&nbsp;፡ ወያብዕል&nbsp;። ያኀስርሂ&nbsp;፡ ወያከብር&nbsp;፡ ዘያነሥኦ&nbsp;፡ እምድር&nbsp;፡ ለነዳይ&nbsp;። ከመ&nbsp;፡ ያንብሮ&nbsp;፡ ምስለ&nbsp;፡ ዓበይ[ተ]&nbsp;።</p>
36	</body>
37</html>