|
Rank: Advanced Member
Groups: Registered
Joined: 12/18/2014 Posts: 34
|
I want a function that will keep a track whether spell check is performed or not. I need to save binary bit in database as well as its mandatory task to perform spell check. how to call customize function on finishing spell check . swati swati
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Swati, you can use this Code: var spellcheckperformed = false; rapidSpell.addEventListener('<b>dialog_finishedcheckingall</b>', function (src, textbox, complete) { spellcheckperformed = complete;
});
Jim -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/18/2014 Posts: 34
|
Hi Jim, i am using javascript and its not working for me , DO i need to parse any values for src,textbox and complete or its getting autopopulated, I have three textboxes in which spell check is used. swati swati
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
No, you don't need to do anything with those parameters. Can you show me your actual code please? -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/18/2014 Posts: 34
|
I am using this for opening spell check popup -: var spellCheckOperation = false; $scope.spellCheck = function () { if (!$scope.spellCheckOperation)// { rapidSpell.setParameterValue(tinyMCE.get(tinyMCE.activeEditor.editorId).getElement(), 'IgnoreXML', true); //added by swati for spell check rapidSpell.setParameterValue('default', 'LeaveWindowOpenForUndo', true); rapidSpell.dialog_spellCheck(true, ['titleTxtBox', tinyMCE.activeEditor.editorId, 'teaserTxtBox']); //implemented for all three input elements $scope.note.isSpellChecked = true; spellCheckOperation = true; prevTitle = $scope.note.title; prevSummary = $scope.note.summary; prevContent = $scope.note.content; spellchkperformed = true; } and after that i am using var spellcheckperformed = false; rapidSpell.addEventListener('dialog_finishedcheckingall', function (src, textbox, complete) { spellcheckperformed = complete; }); swati swati
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/18/2014 Posts: 34
|
Also on finish window my window is closing we have customized so that user click on finish first to close inorder to make user undo their last made changes as well swati swati
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Couple of things, unless I'm not understanding your code, you need to call rapidSpell.addEventListener('dialog_finishedcheckingall', function (src, textbox, complete) { spellcheckperformed = complete; }); before you call rapidSpell.dialog_spellCheck..... also "spellchkperformed = true;" is misspelled, but I don't see the purpose of setting that anyway, since it will be true as soon as the spell check starts, not whether the spell check was completed or not. Hope that helps? -your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/18/2014 Posts: 34
|
Hi Jim, i tried placing the eventhanlder above the spell check dialog still it not firing the event on finishing the spelling check. I am not understanding where i have to put this code so that i can debug it on finising. rapidSpell.addEventListener('dialog_finishedcheckingall', function (src, textbox, complete) { spellcheckperformed = complete; }); swati swati
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Here's a working example Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="../Scripts/RapidSpell-DIALOG.js" type="text/javascript"></script> <script type="text/javascript"> rapidSpell.setParameterValue('default', "UserDictionaryFile", "");
rapidSpell.setParameterValue('default', 'LeaveWindowOpenForUndo', true);
rapidSpell.addEventListener('dialog_startedcheckingtextbox', function (src, textbox, complete) { textbox.disabled = true; }); rapidSpell.addEventListener('dialog_finishedcheckingtextbox', function (src, textbox, complete) { textbox.disabled = false; });
rapidSpell.addEventListener('dialog_finishedcheckingall', function (src, textbox, complete) { spellcheckperformed = complete; alert('d'); }); </script> <title></title> </head> <body> <form> <textarea id="Textarea1">Jim fdg retr</textarea> <textarea id="Textarea2">Wdas</textarea>
<input type="button" onclick="rapidSpell.dialog_spellCheck(true)" /> </form> </body> </html>
-your feedback is helpful to other users, thank you!-your feedback is helpful to other users, thank you!
|
|