My intention is to do sandhi on text inputted by the user.
I am trying to import this sanskrit external sandhi rules module for node.js into my code and use the functions.
My html is as follows:
<input id='inpo1' class= 'inpo' type='text'/>
<input id='inpo2' class= 'inpo' type='text'/>
<textarea id='res' readonly></textarea>
<button id='print'>
print
</button>
My js is as follows:
$("#print").click(function() {
var inpo1 = $("#inpo1").val();
var inpo2 = $("#inpo2").val();
$("#res").val(sandhi(inpo1, inpo2));
});
However, it does not work as expected.