Javascript: TXTextControl.Proofing.saveUserDictionary Method
Description
Saves an existing user dictionary by supplying the contained words as a string array to a callback function.
Syntax
<void> TXTextControl.Proofing.saveUserDictionary(<string> name, <SaveUserDictionaryCallback> callback)Parameters
| Parameter | Description |
|---|---|
| name | The user dictionary's name. |
| callback | The callback function which is called as soon as the dictionary content has been received from the server. The callback function is called with two parameters: the dictionary's name as a string and the word list as a string array. |
Examples
The following example demonstrates TXTextControl.Proofing.saveUserDictionary in a practical document-editing workflow. It saves an existing user dictionary by supplying the contained words as a string array to a callback function.
function saveUserDictionary(proofing) {
proofing.saveUserDictionary(
"QuarterlyReport",
function(name, words) {
console.log("save user dictionary result:", { name, words });
}
);
}