Back to LanguageTool Homepage - Privacy - Imprint

Update languagetool proxy file to socket


(Haseeb Ashfaq) #1

Hi i setup languagetool instance on socket , now how how can updated proxy file to socket server , is there any option in tinymce to connect with socket , or i make some custom solution for this .

i’m asking about Socket.io not HTTP

following document cover only HTTP

http://wiki.languagetool.org/integration-on-websites

Example code:

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.6/socket.io.min.js"></script>
 <!-- <script src="/main.js"></script> -->
<script type="text/javascript">

var socket = io.connect('http://0.0.0.0:8084');

texts = "i can emit to server and that did succeed but when i receive from passenger the data from server "
    socket.emit('check grammar req', {'language': 'en-US', 'text': texts });

    socket.on('check grammar res', function (data) {
    	// console.log(JSON.stringify(data));
    	console.log((data.message));
    	$('#message1').html(JSON.stringify(data.message));
    });
</script>
<div id="message1"></div>

(Daniel Naber) #2

Have you checked http://wiki.languagetool.org/integration-on-websites?


(Haseeb Ashfaq) #3

yes , but its use for ajax