nikud.js
Version:
jQuery plugin for [Hebrew Niqqud](https://en.wikipedia.org/wiki/Niqqud). This plugin adds a Niqqud Toolbar to any HTML input element.
44 lines (39 loc) • 997 B
HTML
<html lang="he"
dir="rtl">
<head>
<meta charset="utf-8">
<link rel="stylesheet"
href="src/nikud.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.js"></script>
<script src="src/nikud.js"></script>
<style>
@font-face {
font-family: 'SBL hebrew';
font-style: normal;
font-weight: 400;
src: local('SBL hebrew'), url(src/SBL_Hbrw.ttf) format('truetype'), url(src/SBL_Hbrw.eot) format('opentype');
}
body {
text-align: center;
}
input {
font-size: 30px;
font-family: 'SBL Hebrew', Narkisim, David, monospace;
}
</style>
<script>
$(document).ready(function () {
var input = $('input');
var len = input.val().length * 2;
input[0].setSelectionRange(len, len);
input.nikud();
})
</script>
</head>
<body>
<input type="text"
value="שָלוֹם"
class="nikud"
autofocus />
</body>