Back to LanguageTool Homepage - Privacy - Imprint

Languagetools on website


(Accommodation) #1

We would like to have Languagetools running on our website as you have set it up on your homepage where our visitors can check spelling.

We have downloaded and installed Languagetools and got it working on our webserver using the notes from http://www.languagetool.org/http-api/, but as it is bound to localhost we aren't quite sure where we go from here.

Is there a web front end for it anywhere, and how do we make the http server accessible from a webpage?


(Daniel Naber) #2

On Di 05.02.2013, 15:13:45 you wrote:

Is there a web front end for it anywhere, and how do we make the http
server accessible from a webpage?

Sorry, this is indeed not properly documented yet. But you can take the web
front end as it is on www.languagetool.org. The same files are also in
SVN[1]. It's all client-side Javascript and HTML.

However, you will need a proxy if the LT server is running on a different
server than the web page, as Javascript prohibits access to other hosts
("same origin policy"). If Javascript accesses the server directly, it
needs to be started with "--public".

I should also mention that this front end was written for demonstration
purposes and hasn't been tested that much.

Let us know if you have more questions or if this doesn't work.

Regards
Daniel

[1]https://languagetool.svn.sourceforge.net/svnroot/languagetool/trunk/website/www/online-check/tiny_mce/

--
http://www.danielnaber.de


(Accommodation) #3

Thanks Daniel. we have managed to get it up and running on our website. We have one other question though, is it possible to enable right click in the textarea to allow pasting of text?

I notice that TinyMce has a paste plugin but we haven't been able to get it to work with languagetool. Is right click/paste disabled somewhere in the setup?


(Daniel Naber) #4

On Di 19.02.2013, 00:31:46 you wrote:

I notice that TinyMce has a paste plugin but we haven't been able to get
it to work with languagetool. Is right click/paste disabled somewhere in
the setup?

It might be this line in the code:

editor.onContextMenu.add(plugin._doNotShowMenu, plugin);

You could try playing around with that. I only remember that this is one of
the aspects where browser behavior is different.

Regards
Daniel

--
http://www.danielnaber.de


(Accommodation) #5

Thanks Daniel, you were right.

For anyone looking for the answer to this problem in future, simply change this line in editor_plugin.js:

editor.onContextMenu.add(plugin._doNotShowMenu, plugin);

to

editor.onContextMenu.add(plugin._showMenu, plugin);

and your browser's right click menu becomes available with cut, copy, paste etc.

We have tried it in recent versions of all four major browsers and there doesn't seem to be a problem with it so far.