Grammalecte  Diff

Differences From Artifact [2b20dc2adf]:

To Artifact [ffd28e54f4]:


40
41
42
43
44
45
46








47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

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

    if (typeof(oGrammalecteAPI) === "object"  &&  oGrammalecteAPI !== null) {
        ...
    }










### 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"`.


### Open the Grammalecte panel for a node

If you have disabled the spinning button, you can launch the Grammalecte panel with your custom button.

    oGrammalecteAPI.openPanelForNode("node_id")







>
>
>
>
>
>
>
>









|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

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

    if (typeof(oGrammalecteAPI) === "object"  &&  oGrammalecteAPI !== null) {
        ...
    }

When the Grammalecte API is ready, it sends an event called `GrammalecteLoaded` on the `document` node.

You can detect it with:

    document.addEventListener("GrammalecteLoaded", function (event) {
        ...
    });


### 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 Grammalecte not to create these buttons on your text areas with the property: `data-grammalecte_button="false"`.


### Open the Grammalecte panel for a node

If you have disabled the spinning button, you can launch the Grammalecte panel with your custom button.

    oGrammalecteAPI.openPanelForNode("node_id")