TinyMCE 4 Plugin

We use “message” in almost all LanguageTool applications (web, Google Docs, Chrome, FireFox…). In LibreOffice “shortmessage” is used. But “shortmessage” can be missing, it is not a required field (the default is “message”). “Rule description” is not intended as a message for the user. It is used, for example, in configuration panels.

In the current (old) TinyMCE plugin there is some adjustment for long messages:

Alright done. What I did is this:

By default it is set to shortMessage and if that is blank use the normal message.

I also added an option of lt_full_message which will only show normal messages.

I had no problem adding wordwrap via css. (might have been an old browser thing)

I did a big upgrade to the module for handling large texts. Now large requests are split up into multiple requests (which still follows the timer).

There is also a progress bar now that tells you how its going. (It works 95% of the time flawlessly but still a few minor caveats here and there). The progress bar also shows on the bottom the total amount of issues.

Also when editing large text, I made it that a priority based queue system. So if you load a large document and start working on text while its checking, it will prioritize the text you are currently working on thus not seeing any significant delays.

Lastly I also added a dialog box that lets you search and replace issues. Which really helps in large documents.

Lots of other changes here and there, hopefully nothing broke .

I think usability could be improved by checking immediately after a text modification. Currently it seems you have to leave the paragraph first.

Hmm, that odd prior it should have worked when you use a “.”, “!” or “?” to end a sentence. I’ll take a look.

I meant the case when you manually modify (not add) text, e.g. fix an error without going to the menu and selecting a suggestion.

I see, yeah you generally have to leave the line. What maybe i’ll do is if you manually modify the error I’ll put a keyboard timer so that it will check after maybe 3-5 seconds of someone stopping typing for the next patch.

Alright, I added a 3 second delay for it to check (assuming you are on private instance, on public would be 10 seconds or less if you didn’t write any recent sentences).

I also added ability to manually make adjustments via the Find/Replace Dialog.

Now it has stopped working for me, I don’t get underlines anymore with Firefox nor Chrome. I get INFO|LAST RUN WITHIN TIMER in the console, counting up fast, but no actual requests seem to be sent.

Hmmm… odd. This seems to be something with private server mode. Public server mode still seems to work.

I’ll take a look at it.

Alright, fixed along side a few other fixes.

Thanks. It doesn’t work yet as I would think it would feel natural, e.g. if I have an error and then edit it, the underline isn’t updated:

The whole misspelled word should be underlined here I guess, without moving away with the cursor.

I am a little confused. What did you write before editing it? and then what did you edit.

What it does is remove the underline the moment you start typing as long as you type on the underline.

I wrote This is an test and then added the gibberish. So the original “an/a” error is gone, but there’s now a typo.

if you check for edits to the edges of the underlined area (between the leading space/punctuation and first letter or between the last letter and the trailing space/punctuation), then you should be good to go

The issue here is that when you edit in front of the error “an”, it doesn’t see you within the tag, your kind of outside it so it can’t tell you are editing it.

What I might do is do an offset test as well to see if the offset in front or back matches. Will have to experiment with it.

If you modify between the “a|n” it should work fine though. I’ll see about the other case scenarios.

That is what I plan to try. Was gonna write it but the forum crashed (either that or there was an issue between my isp and server backbone). Though it can be a bit tricky to do, I’ll have to see and how complex it is. I also kinda want to limit how much stuff I check on key events as that can cause a lot of lag if I am not careful.

Had the same thing, think it was a forum-side problem.

Ok, I made the changes. Give it a shot.

Works better now, but it’s still a bit buggy sometimes: I use the English demo text from languagetool.org and when I remove the first “of” in the “of of” repetition error, sometimes the underline under the remaining “of” doesn’t disappear.