Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

How to call customize function on finish button - RapidSpell Web ASP.NET - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
Swati
#1 Posted : Wednesday, January 7, 2015 6:56:19 AM
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
Jim
#2 Posted : Wednesday, January 7, 2015 12:51:33 PM
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!


Swati
#3 Posted : Wednesday, January 7, 2015 11:48:31 PM
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
Jim
#4 Posted : Wednesday, January 7, 2015 11:57:28 PM
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!


Swati
#5 Posted : Thursday, January 8, 2015 12:10:51 AM
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
Swati
#6 Posted : Thursday, January 8, 2015 12:30:32 AM
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
Jim
#7 Posted : Thursday, January 8, 2015 12:39:01 AM
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!


Swati
#8 Posted : Thursday, January 8, 2015 3:29:13 AM
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
Jim
#9 Posted : Thursday, January 8, 2015 12:55:44 PM
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!


Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.