Back to LanguageTool Homepage - Privacy - Imprint

LanguageTool - Js Integration without tinyMCE


#1

Hi,

Simple question. On the wiki I see an integration example but it use TinyMCE.
On my side, this can't be compatible with my usage.

Is it exist a jquery plugin (for example) or a JS Code snippet for integrating and more (parse and treat Json Response) ?

Thanks by advance,

Jonathan


#2

Can you clarify more specifically on what your usage is?

Are you working with ContentEditable at all?

If yes you can look at my TinyMCE 4 plugin which I made more modular so you can implement to any ContentEditable (examples for TinyMCE and CKEditor(only proof of concept) are there)

If not then the JSON API is here:

https://languagetool.org/http-api/swagger-ui/#/


#3

Hi, thanks for helping.

I can't use tinyMce plugin because I use Summernote.
I try to use together but result is... mmmm

I can make a sumernote plugin but before, if a simple jquery plugin client to expose result of Json in a simple conteneditable...

Thanks,

Jonathan


#4

You using summernote is not a problem.

If you look at my project there is a js library called: languagetool.min.js

This is a modular library for ContentEditable. All you have to do is create a map for summernote of all the functions. You can use the TinyMCE plugin(fully mapped) and the CKEDitor(not fully mapped) as a guideline for making your own plugin.

95% of the work is done in that module, you only have to fill in the last 5%.


#5

Oh and to add if what you are trying to do is just replicate the front page of languagetool where they click a button to check instead of what I have with tinymce (where is checks as you type), then its even easier to map. All you would need to do is map the body of the contenteditabe, its object and make the button trigger setcontent event.


#6

Here is an example of it being used on ContentEditable with a button:

https://jsfiddle.net/kptLr4fx/

There is a 10 second delay in processing which is there as a safety feature, you can get around it by:

1) using your own LT server
2) changing the code but make sure that you set your own safety limits public server should not be hit too many times.


#7

!!! Thanks !!!

This was the second solution.
I have a button to check for grammar rules (mispelling no because, for FR there isn't replacement words : ff and chrome spellchecker are better).

For the moment I will use public rest server. When the product will go out from beta... I'll install my own server.

Thanks a lot again,

Jonathan


#8

No problem. To configure different options, check the TinyMCE4 plugin documentation, it takes the same options that start with lt_