jazzband / django-tinymce

TinyMCE integration for Django
http://django-tinymce.readthedocs.org/
MIT License
1.29k stars 316 forks source link

Issues with setting up browser_spellcheck - Need configuration help #362

Closed pmi123 closed 1 year ago

pmi123 commented 3 years ago

I just installed django-tinymce==3.3.0 on Djang0=3.0.2 using python 3.6.9. I am only using tinymce in the Django admin. It all seems to be working except one part of the spell checker.

I am using the browser spell checker, so there is no plugin. Misspelled words are highlighted in the tinymce textarea by the browser and I can correct them with a right mouse click. The problem is the menu item 'spell check' and the toolbar 'spell check' buttons "crash" the application, in that the tinymce text area is grayed out and the three "wait for me" dots never go away. It seems to be looking for something (a plugin?) and I have to refresh the page to stop the waiting.

I tried the following:

  1. Add spellchecker to the plugins in the settings, and no difference
  2. Removing TINYMCE_SPELLCHECKER = True from the settings. The stopped the "crashing" (for want of a better word), but now I get an annoying warning message "The spelling service was not found...".

What are the correct settings to (1) either have the spell check buttons work with the browser spell checker, or (2) remove those buttons from the menu and toolbar so I don't get that annoying error message?

I am sure I have just misconfigured my setup regarding spell checking, but Google has not provided an answer to my question.

My configuration for tinymce (straight from the docs):

TINYMCE_DEFAULT_CONFIG = {
    "height": "320px",
    "width": "960px",
    "menubar": "file edit view insert format tools table help",
    "plugins": "advlist autolink lists link image charmap print preview anchor searchreplace visualblocks code"
    "fullscreen insertdatetime media table paste code help wordcount spellchecker",
    "toolbar": "undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft "
    "aligncenter alignright alignjustify | outdent indent |  numlist bullist checklist | forecolor "
    "backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | "
    "fullscreen  preview save print | insertfile image media pageembed template link anchor codesample | "
    "a11ycheck ltr rtl | showcomments addcomment code",
    "custom_undo_redo_levels": 10,
    "browser_spellcheck": True,
    "contextmenu": False
}

Thanks!

Mark

tauzahmd commented 3 years ago

I was also looking for some kinda solution on setting up the spellchecker. Did you get yours working ?

Edit: After digging through the code I found that there was a bug. I have fixed the code and created a pull request.

babastienne commented 1 year ago

@claudep I think this issue can be closed. I cannot replicate the problem, it seems fixed.

claudep commented 1 year ago

Thanks for checking, trusting you!

tauzahmd commented 1 year ago

@claudep I think this issue can be closed. I cannot replicate the problem, it seems fixed.

I had fixed it in the #373

claudep commented 1 year ago

Oh, of course, thanks for the reminder!