TinyMCE 4 Plugin

So I took a shot at making a plugin for TinyMCE4. IT is currently in alpha so it is bound to have a lot of bugs. Still it works for the most part.

Demo: (You have to finish a line or sentence and after a short delay it will check spelling and grammar)
https://knowzero.github.io/tinymce4-languagetool/demo.html

Github:

Looks great!
Yet, here is my first bug report. Words recognized as spelling errors are not displayed.

1 Like

May I know what browser?

I see its firefox. I shouldn’t have been fancy with the masks. (was hoping to allow more customization in color via css)

I reverted back to using multiple pngs.

I’ll try again later with svg, maybe I’ll have more luck.

Edit: SVG seems to work and allows for configuring of color in the CSS. So it should be good now.

Yes, it’s Firefox.

Thanks! It should be fixed now.

I can confirm this.

So, anyone else find any bugs?

I tried seeing if anyone on TinyMCE forum was interested, but for w\e reason the mods deleted my thread and I can’t log in any more. Didn’t see any rules or anything against it and not sure if it is because it competes with their paid solution :confused: But either way, long story short. I see no way to procure more testers :disappointed:

I know nothing about TinyMCE, but I am sorry to hear about your troubles on their forum :frowning: . I just threw some sample text at your demo and it seemed to work well. The only issues I encountered I doubt have anything to do with your implementation. They were (1) slowness, especially the first couple times I chose a replacement (this is probably due to my high-latency satellite Internet connection and (2) some “hit” problems with right-clicking, sometimes I was getting the error on the line below the one I intended to click (I suspect user-error).

Thanks for testing.

Did you copy and paste a large document? If so there would be a delay in rendering (which would be even longer on the demo which has debugging set to on as it prints the messages into console)

Based on my tests, around 77k words to copy and paste took about 2 minutes on a local instance of LT + n-grams. Most of that though was waiting for LT to get back to me.

On that front I consider 2 things:
a) Adding a progress bar
b) See if dividing it up when it is large and sending it in parallel helps on that front (though for private instances)

If not there is a 10 second delay between rendering on lines when using the public server. Private instances could lower that down to as low as 100ms, though probably best to set it to 1000ms (1 second).

I am not quite getting your 2nd statement. You mean like when you click below the red line it gives you error suggestions? The mouse should change to a question mark at eligible areas. Maybe a screenshot would help?

Feel free to set it to 500ms, even when using our public instance, at least as long as it’s only for testing. I tried your demo URL and couldn’t find any bugs (tried with Firefox only). I can announce this test (https://knowzero.github.io/tinymce4-languagetool/demo.html) on our social media channels, should I do that?

BTW, I’d find it more natural if a left click opened the error popup.

I can make an option so that you can chose to right click or left click. I chose right click for 2 reasons:

  1. That is how other word processors do it so people are used to it.

  2. A person may want to edit the word themselves instead of letting the spellcheck do it for them (assuming the spellcheck guessed wrong)

I guess then I’ll make 2 demo versions, one for people to see how it will be on public server and how it would be for private server. This way it won’t confuse people when they set it up thinking why it is having the delay despite the demo working almost instantly.

As for putting it up on social, that would be awesome! Though first let me fix one last bug I just found (it seems it gets a bit funky with multi-celled tables). I’ll tell you when I fixed it.

Maybe you could also add some text on the demo page itself, describing what exactly it does and what people can/should test. For example, it currently seems to be English only. This should probably be mentioned, or there could be some drop-down to select the language.

Ok, I’ll make a drop down. (Since I have not tested with other languages)

Done! As long as I didn’t break anything, I put everything behind a dropdown to chose prior. They can refresh to play with other options.

Looks good. Do you maybe want to add some contact information so users can report bugs? Most people will be too lazy to register at the forum etc.

Looks good!

One thing to change: when you click on an error, you are shown the “rule description”. Instead, you should be shown the “message”.

I added information to the demo page. A Github and an email. Hopefully I coded the email (code wise) so it doesn’t get spammed by bots :expressionless:

Thanks.

I’ll look into it for the next patch. I think last I checked some of them were pretty long so I took the one that was mid sized. Maybe what I’ll do is see if there is a shortMessage, if not use the standard sized one. That would probably be fine.