Ticket #650 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

SpellChecker is not compatible with FullPage plugin

Reported by: anonymous Owned by: gogo
Priority: high Milestone: Version 1.0
Component: Plugin_SpellChecker Version: trunk
Severity: normal Keywords: spellchecker fullpage gethtml
Cc:

Description

Took me a while to track this one down. When I add FullPage? to my list of plugins, SpellChecker still runs fine - but it won't return the corrected text back to the editor.

Here is the list of plugins I used (taken from your newbie example on your website):

'CharacterMap', 'ContextMenu', 'FullScreen?', 'ListType', 'SpellChecker', 'Stylist', 'SuperClean', 'TableOperations'

This works fine, but if you add FullPage? to the list of plugins (I tried adding to the top of this list, and to the bottom - neither one worked) then SpellChecker fails to function properly.

Change History

Changed 7 years ago by anonymous

  • priority changed from normal to high
  • milestone set to Version 1.0

Changed 6 years ago by guest

  • keywords gethtml added

Ok, I've narrowed down the problem further to this line in spell-check-ui.js:

return window.opener.HTMLArea.getHTML(frame.contentWindow.document.body, false, editor);

If you have FullPage? plugin loaded, this needs to be:

return window.opener.HTMLArea.getHTML(frame.contentWindow.document.documentElement, false, editor);

and then it works correctly, somewhat... See below.

To clarify:

=====

Plugins: SpellChecker

Element: frame.contentWindow.document.body / Status: WORKS

Element: frame.contentWindow.document.documentElement / Status: WORKS - But pollutes HTML with SpellChecker stuff.

=====

Plugins: SpellChecker, GetHtml

Element: frame.contentWindow.document.body / Status: WORKS

Element: frame.contentWindow.document.documentElement / Status: WORKS - But pollutes HTML with SpellChecker stuff.

=====

Plugins: SpellChecker, FullPage?

Element: frame.contentWindow.document.body / Status: BROKEN

Element: frame.contentWindow.document.documentElement / Status: WORKS - But pollutes HTML with SpellChecker stuff.

=====

Plugins: SpellChecker, FullPage?, GetHtml

Element: frame.contentWindow.document.body / Status: BROKEN

Element: frame.contentWindow.document.documentElement / Status: BROKEN - Because GetHTML doesn't appear to be returning the HTML from the spellchecker window, but the HTML from our original editor window (which still has the words mispelled).

Changed 6 years ago by guest

After all of that, the simple fix seems to be to change this line:

return window.opener.HTMLArea.getHTML(frame.contentWindow.document.body, false, editor);

to this line:

return window.opener.HTMLArea.getHTML(frame.contentWindow.document.body, true, editor);

and it seems to work just fine. Phew.. Finally, I've been working on this bug for MONTHS now. :) Enjoy!

Changed 6 years ago by gogo

  • status changed from new to closed
  • resolution set to fixed

Applied your last fix in changeset:663 seems to work.

Note: See TracTickets for help on using tickets.