Rank: Newbie Groups: Member
Joined: 4/10/2012 Posts: 1
|
I have downloaded EO.Web for ASP.NET in order to try out the spelling checker functionality. If it works according to our needs then our company would like to purchase the product. One of the requirements is to be able to add words to the dictionary. I tried to implement this in some test code by adding to the .aspx page a SpellChecker and SpellCheckerDialog and then adding an "OnCustomWord" event handler. I am passing the second parameter of the function SpellChecker1.AddCustomWord() as true, as I understand that this determines if the word is to be added globally - i.e. permanently added to a custom dictionary. However, when I run the code, although the spelling checker dialog works well and the OnCustomWord event is called by the code when I click on "Add to Dictionary", I cannot see where the word has been added. There is no file added to the eo_dict folder or within the en_AU or en_US directories that I set up. After searching for some time through the forums I understood the name of the custom dictionary is supposed to be user_words.txt, but I couldn't find any such file anywhere.
Please help - where is the custom dictionary? Is the way I have implemented the custom dictionary add word handling correct?
If we can't confirm that this works correctly as we require we will have to look for an alternative product. Many thanks.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You will need to handle the SpellChecker control's CustomWord event to save the words yourself. That event is called whenever user clicks the "Add to Dictionary" button to add a custom word, inside that event handler, you would save the newly added words by whatever means that works for you. You would then handle your application's Start event to load all the words you have saved and then call the SpellChecker's AddCustomWord to load it back to the SpellChecker. So the rule is:
1. Inside OnCustomWord handler --> Call your code to save 2. Inside ApplicationStart event -> Call your code to load -> Call SpellChecker's AddCustomWord
This way you will have full control of where and how to save your custom words. For example, some user wants to save the custom words into database, and some wants to only load "mostly used" words --- such as different users have added 1000 different words but 200 of them are repeated many times by different users, then you can implement your own logic to only load those 200 "mostly used" words.
Hope this helps. Please let us know if you still have any questions.
Thanks!
|