Grammalecte  Diff

Differences From Artifact [041f12ee10]:

To Artifact [4cb0aa8b8f]:


1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
1
2
3
4
5
6
7

8
9
10
11
12
13
14
15







-
+







# API for the web

## Using the Grammalecte API for the web

**With Grammalecte 1.8+.** (beta stage)

If Grammalecte is installed by the user on his browser (like Firefox or Chrome), you can call
several functions for a better integration of grammar checking for your website. This is mostly usefull
several methods for a better integration of grammar checking for your website. This is mostly usefull
if you use non-standard textareas.

You can:

- disable the Grammalecte button (spinning pearl),

- launch the Grammalecte panel with custom button (or when you think it’s necessary),
31
32
33
34
35
36
37
38
39
40
41
42
43

44
45
46
47
48
49
50





51
52
53
54
55
56
57
31
32
33
34
35
36
37

38




39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58







-

-
-
-
-
+







+
+
+
+
+








    ·> webpage script
    <> Grammalecte API (injected by the content-script, callable by the webpage script)
    <> Content-script (injected by the extension, not callable by the webpage script)
    <> Background script (extension core)
    <· Worker running the grammar checker on a different process

### Version of the Grammalecte Web API

    oGrammalecteAPI.sVersion


### Detecting if Grammalecte API is here
### Detecting if the Grammalecte API is here

Every call to the Grammalecte API will be done via an object called `oGrammalecteAPI`.

    if (typeof(oGrammalecteAPI) === "object") {
        ...
    }


### Version of the Grammalecte API

    oGrammalecteAPI.sVersion


### Disabling the Grammalecte button (the spinning pearl)

By default, Grammalecte inserts a button (a spinning pearl) on each textarea node and editable node (unless the user disabled it).
You can tell Grammalete not to create these buttons on your text areas with the property: `data-grammalecte_button="false"`.