#10515 closed defect (bug) (fixed)
TinyMCE spellchecker markup disappears during auto-save
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9 |
| Component: | TinyMCE | Version: | 2.8 |
| Severity: | normal | Keywords: | upstream |
| Cc: |
Description
The WordPress spell checker strips the spellchecker markup during an auto-save event.
How to reproduce?
- Type: "I can't spel, AO plz help." into the WordPress Visual Editor
- Click the spellcheck button.
- Wait for the auto-save.
What happened?
On auto-save the before get content event is fired and the spellchecker removes the markup for the misspelled words.
http://wiki.moxiecode.com/index.php/TinyMCE:API/tinymce.Editor/onBeforeGetContent
This is the only good client side time for the spellchecker to strip its markup from a post. A possible work around is to do the stripping on the server side but this is extremely error prone.
Suggested fix:
Consider updating TinyMCE to pass a why parameter to onBeforeGetContent or at least setting some property readable editor propery before auto-save and unsetting it afterwards. This will allow plugins that choose to look at these values to not strip their markup during an auto-save event.
Attachments (1)
Change History (5)
- Component changed from General to TinyMCE
- Keywords upstream added
- Milestone changed from Unassigned to Future Release
- Version set to 2.9
Would be good if this is fixed upstream, perhaps when TinyMCE gets native autosave support.
Replying to dd32:
Or WordPress could work around the issue by disabling auto-saves while spellcheckers active...
There's actually a check in autosave whether the spellchecker is active but it doesn't stop tinyMCE.save() that is resetting it (autosave would still run to keep the post lock).
Attaching a patch that will need some more testing for all cases: new post, adding media, concurrent editing to make sure the post is locked properly at all times, etc.
- Resolution set to fixed
- Status changed from new to closed

This ticket needs to be submitted upstream to the TinyMCE bug tracker, That is the only location it can be fixed, WordPress might back-port any changes made to the currently-included editor...
Or WordPress could work around the issue by disabling auto-saves while spellcheckers active...
Setting to Future release pending patch upstream.