SpellChecker Running On Single Page Application

55 views
Skip to first unread message

dave.murp...@gmail.com

unread,
Dec 5, 2014, 12:29:53 PM12/5/14
to javascript...@googlegroups.com
My application runs on a single page application. We are using AJAX to load HTML segments onto a single as a user navigates from screen to screen.

The issue we have is that the as a user navigates between screens the SpellChecker is maintaining a cache of controls which were on previous screens.

Is there a mechanism to allow us to clear the list of controls which are spellchecked so that the SpellChecker only checks for controls which are on the current screen ?

Thanks in advance,
Dave.

Greg

unread,
Jul 7, 2017, 9:26:10 AM7/7/17
to JavaScriptSpellCheck, dave.murp...@gmail.com
I also have the same question:

In general, can JavaScript Spell Check be used in single page applications where the DOM in never fully re-created?

Is there a way to "clear" or "reset" the state of JavaScript Spell Check when a user navigates from page to page in a single page application?

Thanks,
Greg

Team NanoSpell

unread,
Jul 11, 2017, 2:35:44 AM7/11/17
to gho...@solutionstreet.com, dave.murp...@gmail.com, javascript...@googlegroups.com
Hi Greg,

Thanks for getting in touch and thanks for your interest in our product. 

Please take a look at the code below and give that a go:

var myspell = $Spelling.SpellCheckAsYouType('all');
myspell.PauseAsYouType()   // pauses / stops the spellchecker
myspell.ActivateAsYouType()   // restarts all spellchecker

I hope this helps to answer your question and Nanospell can be the product for you.

Any other queries please do let me know. 

Thanks,
​Cameron

-- Cameron Rimington

NanoSpell SpellChecking Software Component Support

te...@nanospell.com
Greg on July 7, 2017 at 8:26pm wrote:

I also have the same question: In general, can JavaScript Spell Check be used in single page applications where the DOM in never fully re-created? Is there a way to "clear" or "reset" the state of JavaScript Spell Check when a user navigates from page to page in a single page application? Thanks, Greg On Friday, December 5, 2014 at 12:29:53 PM UTC-5, dave.murp...@gmail.com wrote: > My application runs on a single page application. We are using AJAX to load HTML segments onto a single as a user navigates from screen to screen. > > The issue we have is that the as a user navigates between screens the SpellChecker is maintaining a cache of controls which were on previous screens. > > Is there a mechanism to allow us to clear the list of controls which are spellchecked so that the SpellChecker only checks for controls which are on the current screen ? > > Thanks in advance, > Dave. -- You received this message because you are subscribed to the Google Groups "JavaScriptSpellCheck" group. To unsubscribe from this group and stop receiving emails from it, send an email to javascriptspellc...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Greg Hodum

unread,
Jul 24, 2017, 1:23:16 PM7/24/17
to Team NanoSpell, dave.murp...@gmail.com, javascript...@googlegroups.com
Thanks. This indeed hides/shows the spell checking on the page for the given fields, but as Dave previously mentioned here it still seems to cache the input fields that were used on a previous page.

Also, when I print out the following, this array continues to grow which concerns me that this will eventually leak memory in a single page application:

livespell.spellingProviders.length

To clarify the question: is there a way to *cleanly* reset/remove all previous spell check references so this can be used in a Single Page Application?

Thanks,
Greg


You received this message because you are subscribed to a topic in the Google Groups "JavaScriptSpellCheck" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/javascriptspellcheck/iRWrk0LM7-g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to javascriptspellc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages