Grammalecte  Check-in [6163821fce]

Overview
Comment:[doc] Web API: event GrammalecteLoaded when the APi is ready
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | doc
Files: files | file ages | folders
SHA3-256: 6163821fcee415c3dff98df8a37297a1fcb83b5cf05717a82b1f3faf3c74d27b
User & Date: olr on 2020-03-22 08:46:25
Other Links: manifest | tags
Context
2020-03-22
09:22
[doc] Web API: event GrammalecteLoaded when the APi is ready check-in: d8b0e71ca7 user: olr tags: trunk, doc
08:46
[doc] Web API: event GrammalecteLoaded when the APi is ready check-in: 6163821fce user: olr tags: trunk, doc
08:32
[doc] Web API update check-in: 714cebddcc user: olr tags: trunk, doc
Changes

Modified doc/API_web.md from [2b20dc2adf] to [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
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 Grammalete not to create these buttons on your text areas with the property: `data-grammalecte_button="false"`.
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")